Free Online Line Sorter
Paste any list of lines and sort them alphabetically, by length, in reverse order, or shuffle randomly. Options for case-insensitive sorting, duplicate removal, and whitespace trimming.
Sort Mode Reference
A → Z
Sorts lines in ascending alphabetical order using locale-aware string comparison.
Z → A
Sorts lines in descending alphabetical order.
Short → Long
Sorts by character count, shortest lines first.
Long → Short
Sorts by character count, longest lines first.
Reverse Order
Reverses the current order of lines without any sorting — the last line becomes the first.
Shuffle
Randomises the order of lines using a Fisher–Yates shuffle.
Common Use Cases
- Alphabetise a list: Sort country names, product names, or any plain list for readability.
- Deduplicate data: Paste lines from multiple sources and remove duplicates in one click.
- Sort config files: Alphabetise CSS properties, JSON keys (one per line), or import statements.
- Log file processing: Reverse log lines to show the most recent entries first.
Frequently Asked Questions
Paste your list and enable the "Remove duplicates" option — it keeps the first occurrence of each line and discards later repeats, then applies whichever sort mode you've selected.
It means accented and non-English letters sort into their natural alphabetical position (é sorts near e, not after z), matching how a human reader would expect a list to be ordered — rather than a strict character-code sort that can put accented letters in unexpected places.
You can toggle case-insensitive sorting on or off. With it on, "apple" and "Apple" sort next to each other; with it off, sorting follows strict character order, which typically puts all-uppercase entries before lowercase ones.
No — Reverse Order flips whatever order your lines are currently in (the last line becomes first) without comparing them alphabetically. Z → A actively re-sorts every line into descending alphabetical order, which produces a different result unless your list was already sorted A → Z.
It's completely free with no limits, and nothing is sent anywhere — sorting happens entirely in your browser using JavaScript.