How it works
The tool reads your text one line at a time. Each line is compared with every line before it, and if it’s the same, it’s a duplicate. With Remove duplicates on, only one copy of each line is kept. Everything else about the line, including its spelling and punctuation, stays as you typed it.
Two lines count as the same when they match exactly, after these optional tidy-ups:
- Trim line ends (on by default) ignores spaces and tabs at the start and end of each line, so “ Oliver” and “Oliver” match.
- Ignore case treats capitals and small letters as the same, so “Amelia” and “amelia” match. It also handles letters like the German ß (which matches “SS”) and Greek final sigma.
- Ignore extra spaces treats any run of spaces or tabs inside a line as one space, so “New York” and “New York” match.
Accented letters always match however they were typed. An “é” can be stored as one character or as an “e” followed by an accent, and the two look identical, so they’re treated as the same.
Empty lines are never counted as duplicates. With Remove empty lines on, they’re taken out; with it off, they’re left where they are.
A worked example
Say your list is apple, Banana, apple, cherry, banana, apple, one per line. That’s 6 lines. With the default settings, the result is apple, Banana, cherry, banana: 4 lines, with 2 repeated copies removed. “Banana” and “banana” are both kept, because capitals count.
Turn on Ignore case and the result is apple, Banana, cherry. “banana” is now a repeat of “Banana”, and the first spelling is the one that stays.
Sorting lines
Duplicates are removed first, then the lines are sorted. Pick an order from the Sort menu:
| Sort | What it does | Example |
|---|---|---|
| A to Z | Alphabetical, ignoring case. Accented letters sort with their plain letter, so “élan” sits with the e’s. | Item 1, Item 10, Item 2, Item 20 |
| A to Z, numbers in order | Alphabetical, but runs of digits are read as numbers. Best for file names, versions and numbered items. | Item 1, Item 2, Item 10, Item 20 |
| By number | By the first number in each line, including minus signs, decimals and commas. Lines with no number go to the end. | -3, 2.5, £1,250, none |
| By length | Shortest first, counting each emoji or accented letter as one character. Lines of equal length go A to Z. | a, bb, ccc |
| Reverse order | Turns the list upside down, without sorting it. | third, second, first |
| Shuffle | A random order, using your browser’s secure random number generator. | different every time |
For A to Z, numbers in order, by number and by length, tick Largest or Z first to sort the other way.
Common mistakes
- Lines that look the same but aren’t. A trailing space, a double space or a capital letter makes a line different. If you expected more duplicates, try Ignore case and Ignore extra spaces.
- Invisible characters. Text copied from web pages or Word can contain zero-width spaces and non-breaking spaces you can’t see. Run it through the text cleaner first, then remove duplicates here.
- Items separated by commas. This tool works line by line. If your list is “a, b, c” on one line, use find and replace to turn each comma and space into a new line first.
- Sorting numbers A to Z. Plain A to Z puts “10” before “2”, because 1 comes before 2. Use A to Z, numbers in order, or By number.
Related tools
To count how often each word appears in a piece of writing, rather than each line, use the word frequency counter. To pick winners or make teams from a list of names, use the random name picker. The word counter shows how many lines, words and characters you have.
Your list stays private
Everything happens in your browser. Your list isn’t uploaded, logged or stored on a server. It’s kept in this browser tab only, so a refresh doesn’t lose it, and it’s gone when you close the tab.