Sort Text Lines
Sort the lines of any list alphabetically, naturally or by length, ascending or descending, with optional case-insensitive matching and deduplication.
- Runs in your browser
- Free to use
About this tool
Sorting a list sounds trivial until you meet mixed case, numbers in names or thousands of lines. This tool sorts text lines alphabetically, naturally or by length, in either direction, with switches to ignore case, drop duplicates and remove empty lines, and it handles very large inputs instantly in the browser.
Specialised sorters exist for numbers, IP addresses and delimited words.
How to use it — quick steps
- 01
Enter the lines to sort
Type or paste the lines to sort in the field above, one item per line. It stays in your browser.
- 02
Adjust the options
Pick the settings that fit your case; the defaults work for most people. Changes apply instantly.
- 03
Press "Sort lines"
Press "Sort lines" or Ctrl + Enter. The result appears instantly below the form. Results can be copied.
Key features of this tool
Nothing leaves your browser
The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.
Instant results
Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.
Works everywhere
No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.
Frequently asked questions
What is natural sort?
Numbers inside strings are compared by value, so file2 comes before file10. Plain alphabetical order would put file10 first.
How are accented letters sorted?
Using your browser's locale-aware collation, so é sorts next to e rather than after z.
Are my files or data uploaded?
No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.