About Sort Lines
Sort a list one item per line: A to Z, Z to A, natural order (file2 before file10), by number, by line length, or shuffled at random. Numeric mode understands numbers with thousands separators, so 1,000 is sorted as one thousand rather than as 1. You can also ignore case, trim spaces and drop blank lines in the same step.
How to use Sort Lines
- Paste your list with one item per line.
- Choose the order: A–Z, Z–A, natural, number, length or random.
- Set options such as ignore case, trim spaces and remove blank lines.
- Press Sort and copy the result.
Tips and good to know
- Alphabetical sorting is by character code unless you ignore case, so capital letters can come before lower-case ones.
- Use numeric sort for prices, scores and IDs; use plain sort for names.
- Natural order is best for names with numbers in them, such as file2 and file10, which plain A–Z would place the wrong way round.
How computers sort text
Simple alphabetical sorting compares characters by their code numbers, so capital letters may come before lowercase ones and “item10” before “item2”. Natural sorting reads numbers as numbers, putting item2 before item10. Accented letters and different languages have their own ordering rules, and case-insensitive sorting treats Apple and apple as equal. Sorting lists of names, keywords or file names before comparing them makes duplicates and gaps easy to spot.
Alphabetical is not always what you expect
Computers sort by character codes unless told otherwise, so plain sorting puts all capital letters before lower-case ones and puts “item10” before “item2”. Natural sorting fixes the number problem by comparing numbers as numbers, and case-insensitive sorting treats “apple” and “Apple” as neighbours. Accented letters are another trap: a language-aware sort places “é” next to “e” rather than after “z”.
Frequently asked questions
Can I remove duplicates while sorting?
Sort first, then use the Remove Duplicate Lines tool, which keeps each line once.
Is Sort Lines free?
Yes. Sort Lines is free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.
Are my files uploaded?
No. This tool runs in your browser, so your input stays on your device.