ToolGlint

Sort and Dedupe Lines

Sort lines alphabetically or numerically, remove duplicate lines, and reverse or shuffle a list. Runs in your browser.

Paste or type, or drop a file on the box.

Runs in your browser. Nothing you enter is uploaded or stored.

How to use the Sort and Dedupe Lines

  1. Paste your list into the left box with one item on each line, or load the sample.
  2. Choose an order: A to Z, Z to A, by number, by length, reversed, or shuffled.
  3. Tick Remove duplicates to keep only the first copy of each line.
  4. Tick the other options to ignore upper and lower case, trim spaces from each line, or drop empty lines.
  5. Copy the result or download it as a text file. The line under the boxes shows how many lines were removed.

Questions and answers

Is my list sent to a server?
No. Sorting and removing duplicates happen in your browser. Nothing you paste is uploaded, stored or logged, so it is safe for lists of email addresses, customer names or server names.
How do I remove duplicate lines without changing the order?
Set the order to “Keep the order” and tick Remove duplicates. The first copy of each line stays where it was and later copies are removed.
Why are “Apple” and “apple” not treated as duplicates?
By default the tool compares lines exactly, so a difference in capital letters counts. Tick “Ignore upper and lower case” to treat them as the same line; the first one in the list is the one kept. A stray space at the end of a line also makes it different, which “Trim spaces” fixes.
What is the difference between A to Z and sorting by number?
A to Z sorts as a dictionary would, and reads digits inside a line as numbers, so “file2” comes before “file10”. “Numbers, low to high” sorts by the number each line starts with, such as a price or a count, including negatives and decimals. Lines that do not start with a number go to the end.
How are accented and non-English letters sorted?
Lines are sorted with your browser’s language rules instead of raw character codes, so “é” sorts next to “e” and not after “z”. The exact order of some letters depends on the language your browser is set to.
Is the shuffle really random?
It is random enough for mixing up a list, picking an order for a game or randomising test data. It is not suitable for anything where security depends on it, such as a prize draw with money involved. Press “Shuffle again” for a different order.

Related tools