Trieur de texte
Triez les lignes par ordre alphabétique, par longueur ou supprimez les doublons.
À propos du trieur de texte
Collez n'importe quel texte multiligne et triez chaque ligne par ordre alphabétique, alphabétique inverse ou par longueur. Des options vous permettent de supprimer les lignes en double, de normaliser la casse avant la comparaison et de rogner les espaces en début/fin de chaque ligne avant le traitement.
FAQ
- Comment fonctionne le tri alphabétique ?
- Les lignes sont triées à l'aide de localeCompare de JavaScript, qui gère correctement les caractères spéciaux.
- Puis-je trier des nombres ?
- Le tri alphabétique traite les nombres comme du texte. Pour le tri numérique, utilisez le tri par longueur comme solution de contournement ou assurez-vous que les nombres sont complétés avec des zéros.
- Cela gère-t-il les lignes vides ?
- Les lignes vides sont traitées comme des chaînes vides et triées en tête en mode A→Z. Utilisez Rogner les lignes pour les supprimer.
À PROPOS DE CET OUTIL
Paste a list of lines and sort them alphabetically, in reverse alphabetical order, by line length, or strip out duplicate lines, all in a single step without opening a spreadsheet or code editor. Each line is treated as one item, so it works for anything you keep as a plain list: names, URLs, tags, ingredients, CSS classes, or import statements. Sorting happens instantly in your browser as you change options, so you can compare alphabetical order against length-based order to see which is clearer for your use. It's a fast way to turn a messy, unordered paste from an email, spreadsheet column, or notes app into a clean, consistent list ready to reuse.
COMMENT UTILISER
- Paste your list into the input box, one item per line.
- Pick a sort mode: A to Z, Z to A, shortest first, or longest first.
- Turn on duplicate removal if you want only unique lines.
- Check the output panel for the reordered list.
- Copy the result and paste it back into your document or spreadsheet.
CAS D'USAGE COURANTS
- Alphabetizing a bibliography or works-cited list before submitting a paper
- Deduplicating a list of email addresses collected from multiple sign-up forms
- Sorting CSS class names or import statements so a codebase's style stays consistent
- Organizing a recipe's ingredient list alphabetically for easier scanning while shopping
- Cleaning up a list of keywords pulled from several spreadsheets into one unique set
CONSEILS ET ERREURS COURANTES
- Sorting is typically case-sensitive, so uppercase and lowercase versions of the same word can land in different positions than expected
- Trailing spaces or invisible characters count as part of a line, so near-duplicates with extra whitespace may not get merged
- Sorting by length only orders by character count, lines of equal length keep their original relative order
- Remove stray blank lines before sorting, or they'll get shuffled into the result as empty entries
AUTRES QUESTIONS
- Does the tool change my original pasted text?
- No, it only reorders what's shown in the output box. Your original input stays in the input field until you replace or clear it yourself.
- How are numbers handled in alphabetical sort?
- Numbers sort as text characters, not as numeric values, so '10' comes before '2' because '1' is compared before '2' character by character.
- Will removing duplicates catch lines that only differ in capitalization?
- Typically no, exact-match deduplication treats 'Apple' and 'apple' as different lines since the comparison is case-sensitive by default.
- Can I sort a list that mixes short phrases and single words?
- Yes, alphabetical sort works fine on mixed content since it compares character by character regardless of phrase length; length-based sort is more useful if you specifically want to group short and long entries.