List Sorter

Sort lines, remove duplicates and empty lines

Total lines: 0 Unique lines: 0

About This Tool

Drop your list into the box, one item per line, and get it back sorted instantly: ascending, descending or reversed. At the same time you can strip duplicate lines, empty lines and stray whitespace. No install, no signup.

Most of the time the list came from somewhere else and arrived messy: student names for a roll call, a wedding guest list, inventory items, numbers collected from several groups where some appear twice, newsletter email addresses, or keywords pooled from a few different files. Paste it once here and take the clean result.

Alphabetical order is handled correctly for both Latin and Persian text, the total line count and the remaining line count sit above the box, and next to them it tells you how many duplicates and empty lines were set aside. Text direction switches to right-to-left or left-to-right on its own. Your text never leaves your device.

Frequently Asked Questions

How do I sort my list?
Pick a sort type at the top, then type or paste your text into the input box. The result appears in the lower box without pressing anything, and updates the moment you change any option.
What is the difference between "Reverse" and "Descending"?
"Descending" orders the lines alphabetically from the end of the alphabet backwards. "Reverse" ignores the alphabet entirely and just flips your own line order, so the last line becomes the first. When your list already has a meaningful order, such as chronological, "Reverse" is the one you want.
What does "Trim whitespace" do?
It strips spaces and tabs from the start and end of each line. It matters most for duplicate detection: "Ali" and "Ali " with a trailing space count as two separate items and both survive without this option. Keep it on for lists copied out of a PDF or a spreadsheet.
What do "Total lines" and "Unique lines" count?
"Total lines" is how many lines you entered and "Unique lines" is how many are left in the result. The gap between them is exactly what the note beside them reports: how many duplicates and how many empty lines were dropped.
Is alphabetical order handled correctly?
Yes, and that includes Persian: "پ" follows "ب" and "چ" follows "ج", rather than the odd ordering some programs produce. Lists that mix Persian and English sort fine too.
My numbers sort wrong, 10 comes before 2
Sorting compares character by character, and as text "10" does come before "2". The fix is to pad the numbers to the same length, so write 01, 02, 10. Lists of invoice numbers or codes that are already the same length sort correctly from the start.
What happens to uppercase and lowercase letters?
Case does not disturb the sort order, so apple lands next to Apple. Duplicate removal, however, matches exactly, so apple and Apple count as two separate items and both stay.
How do I take the result?
The "Copy result" button copies the whole output at once, and the button label briefly changes to "Copied!" to confirm. You can also select the text in the result box by hand.
Can I download the output as a file?
The output is copied as text. If you need a file, paste the result into the notepad tool on this site and save it from there.
My items are separated by commas, not line breaks
Sorting works line by line, so each item needs its own line first. In whatever editor the list came from, use find and replace to turn commas into line breaks, or put each item in its own cell of a single spreadsheet column and copy the column.
How many lines can it sort?
No limit is imposed, and lists of several thousand lines are fine. With very long text the result may take a moment to refresh.
Why does the text direction change sometimes?
Direction is detected from the first character of your text, so a Persian list is shown right-to-left and a Latin list left-to-right. It only affects how the boxes look and changes nothing in the output itself.
Is my text sent to a server?
No. Nothing leaves your device and nothing is stored, so you can paste a list of names and numbers without concern. For word and character counts, see the text analyzer, and to compare two lists, the diff checker.
Was this tool helpful?
4.7out of 5
Thanks for your feedback!

Related tools

Home