About the Sort Lines Alphabetically
Sort Lines Alphabetically puts any list in order, one line at a time. Choose A to Z or Z to A and the sorted list appears immediately, with uppercase, lowercase, and accented letters sorted together the way a person would expect.
How it works
The text is split into lines, optionally trimmed, emptied of blank lines and de-duplicated (keeping the first occurrence). Lines are then sorted with the browser's locale-aware comparison in numeric mode, so numbers inside lines sort by value: "item2" comes before "item10", and "Éclair" sorts among the E words.
By default the comparison ignores case; tick Case-sensitive to put uppercase first and treat "Apple" and "apple" as different lines when removing duplicates. Length modes sort by number of characters, Reverse order flips the list as it is, and Shuffle uses the browser's secure random generator.
How to use
- 1
Paste your list or open a text file, one item per line.
- 2
Choose the order: A → Z, Z → A, by length, reverse or shuffle.
- 3
Tick Remove duplicates, Remove empty lines, Trim spaces or Case-sensitive as needed.
- 4
Copy or download the result, or click Use as input to keep working on it.
Worked examples
Mixed case and accents
A list with capitalized and accented words.
Case and accents are ignored when comparing, so Éclair sits among the E words.
Numbers in text
Lines that start with numbers.
Sorting is alphabetical, not numeric, so the first character "1" comes before "2".
Reverse order
Same fruit list, Z → A.
Frequently asked questions
Does it sort numbers correctly?+
Yes. Sorting is natural, so 2 comes before 10 and item2 before item10.
Is sorting case sensitive?+
Not by default: uppercase and lowercase are compared as equal. Tick Case-sensitive to change that.
How are accented letters sorted?+
They are sorted with their base letter, so "é" sorts with "e" rather than after "z".
Can I sort by line length instead?+
Yes. Choose Shortest first or Longest first.