Sort Lines A → Z
Sort lines alphabetically from A to Z, with locale-aware comparison. Browser-only.
0 characters
0 characters
About Sort Lines A → Z
This tool sorts the lines of your input alphabetically using locale-aware comparison — accented characters are ordered with their base letters (é next to e), and case differences are ignored by default. Empty lines are dropped.
When to use it
- Producing an alphabetized list of names, tags, or IDs
- Preparing a TODO or inventory list for review
- Normalizing rows before deduplication
- Sorting a small CSV column manually
How it works
Lines are split on LF/CRLF, empty lines are filtered out, and the remainder is sorted via String.prototype.localeCompare. The result is joined back with LF.
Examples
banana apple cherry
apple banana cherry
Frequently asked questions
- Is the sort case-sensitive?
- No by default — localeCompare treats 'Apple' and 'apple' as equivalent for ordering purposes. Uppercase entries keep their case.
- Are accented characters handled correctly?
- Yes. Locale-aware comparison places accented letters next to their base letters (résumé sorts near resume).
- Are empty lines preserved?
- No — empty lines are removed. To keep them, sort manually after padding non-blanks.