- Home
- Tools
- Text Tools
- Sort & Dedupe Lines
- Sort Lines Alphabetically
Sort Lines Alphabetically
Paste a list and get it back in alphabetical order, A to Z. Capitals and accents are sorted the way a dictionary does it.
- Lines in
- 0
- Lines out
- 0
- Duplicates
- 0
What "alphabetical" means here
- Before
- pear Zoë apple Éclair banana Apple eclair 10 apples 9 pears
- After
- 10 apples 9 pears apple Apple banana eclair Éclair pear Zoë
The order is that of an English dictionary, not that of a computer's character table. The difference shows in three places.
Capitals. A plain computer sort puts every capital before every small letter, so Zoë would land above apple. Here capitals only decide between lines that are otherwise the same: apple comes directly before Apple.
Accents. Éclair sorts with the other e's, right after eclair, instead of after z. Alphabets with an order of their own are not followed: in Swedish ä comes after z, on this page it sorts with a.
Numbers. Lines are compared character by character, and the character 1 comes before the character 9. That is why "10 apples" is above "9 pears". For a list with numbers in it, set the order to natural order, or sort numerically.
Digits and punctuation come before letters. Spaces at the start of a line would count as well, which is why trimming is switched on: an indented line would otherwise jump to the top.
For Z to A, choose it under Order. Ignore case makes apple and Apple fully equal; they then keep the order in which you entered them.
Sorting, removing duplicates, numbering and adding a prefix can be combined on the Sort & Dedupe Lines page, which also remembers your settings.