Sort Lines Alphabetically
Sort Lines Alphabetically orders whole lines with a locale-aware text comparison.
Example: sort lines alphabetically
pear apple
apple pear
How to use this tool
- Put one sortable item on each line.
- Run the alphabetical sort.
- Check locale-sensitive ties, blank lines, and duplicate entries.
How the result is made
The tool splits input at line breaks and sorts the complete lines using an Intl.Collator with numeric comparison disabled and base sensitivity. “pear” above “apple” becomes “apple” above “pear”. Case and accents can compare similarly at this sensitivity, while the original line text remains intact.
When to use it
Use it to alphabetize a pasted list of names, titles, or labels without editing each item. Natural Sort differs when embedded digit sequences matter: it treats numbers numerically. Sort Lines by Length disregards the alphabet and orders by grapheme count.
Details to check
Locale comes from the browser environment rather than a chosen control, so ordering can vary across locales. Blank lines participate in the sort and may rise to the top. The tool does not remove duplicates; apply Remove Duplicate Lines first if repeated entries should collapse.
Questions people ask
Will item2 come before item10?
Not reliably in alphabetic mode; use Natural Sort for embedded numbers.
Are original spellings changed?
No. Lines move but their text remains.
Does it deduplicate?
No. Repeated lines remain in the result.