Sort, dedupe, reverse, shuffle and number lines of text.
What it's for
Tidy a list in one go — remove repeats and blank lines, sort it, shuffle it or number it — such as a list of names, emails or items.
Before you start
Have the list ready to paste, one item per line, as it comes from a spreadsheet column, a chat or a document.
Paste the list
Paste it into the Lines box, replacing the example, with one item on each line.
Tick what you want done
Under What to do, Trim whitespace, Remove blank lines, Remove duplicates and Sort are ticked to start. Untick any you do not want, or add Reverse order, Shuffle or Number the lines. They always run in the order listed, whatever order you click them in.
Choose how to sort
Sort puts lines in strict character order, so item10 comes before item9. For a list with numbers in it, tick Sort naturally (item9 before item10) instead.
Decide about capitals
Tick Ignore case when deduplicating if "Apple" and "apple" should count as the same item; the one higher in the list is kept.
Apply and copy
Press Apply to bring the tidied list into view; it also updates as you tick. Then press Copy at the top to take it.
Reading the result
If it goes wrong
The most surprising result this tool can produce: two lines that look identical and are not. apple and apple are different strings, so a dedupe keeps both unless they were trimmed first. That is why trim runs first in the order, and the page says so when it happens.
The operations run in a fixed order, whatever order you select them. A result that depended on which checkbox you clicked first would be impossible to reason about.
Sorting compares code units, never localeCompare. A locale-dependent sort gives a different result on two machines — and a sorted file that still shows a diff defeats the point. Natural sort is its own mode: item9 before item10 is right for a person and wrong for an identifier.
Because they are not identical — one of them has a space on the end. Two lines differing only by whitespace look exactly the same on screen and are different strings, so a dedupe that has not trimmed first keeps both. Switch on Trim whitespace. This page says so when it finds that case.
No. The operations run in a fixed order whatever order you select them: trim, remove blanks, remove duplicates, sort, reverse, shuffle, number. That is deliberate — a result that depended on which box you clicked first would be impossible to reason about.
Because a plain sort compares characters, and the character “1” comes before “9”. That is correct for identifiers and filenames, and wrong for anything a person reads as a list. Use Sort naturally, which compares runs of digits as numbers, and gives item9 before item10.
Because a locale-dependent sort gives a different result on two machines, and a sorted file that still shows a diff against someone else’s defeats the point of sorting it. This compares code units, which is the same rule the JSON formatter follows for sorting keys.
They are preserved. If the text arrives with CRLF endings it leaves with them. Silently rewriting every line ending changes every line of the file, which shows up in version control as a diff touching everything — one of the more annoying ways a text tool can waste your afternoon.
No. Everything happens in your browser, and nothing is transmitted or stored.
Both are correct. Plain compares characters and is right for filenames; natural reads a run of digits as a number.
Important
Runs entirely in your browser; nothing is transmitted. Operations apply in a fixed order regardless of the order you select them, and Windows line endings are preserved. Nothing you type here is sent to our servers — the calculation runs entirely in your browser.