Remove duplicate lines
Take repeated lines out of a list. Keep the original order or sort the result, and choose how to handle letter case and whitespace.
You can compare lines after Unicode normalization, then copy or save the cleaned-up list.
What you can do here
Paste options, tags, email addresses, URLs, or product codes with one item per line. The tool keeps the first copy of any repeated line. Keep the current order or sort the results.
How to use
- Paste your list. Put one item on each line.
- Choose the output order and what to do with case, surrounding whitespace, and blank lines.
- Select “Remove duplicates,” then copy or save the result.
Examples to try
Keep the original order
Input
Alpha Beta Alpha Gamma Beta
Output
Alpha Beta Gamma
Ignore case and surrounding whitespace
Input
Alpha alpha ALPHA Beta
Output
Alpha Beta
Sort the list while removing duplicates
Input
item 10 item 2 item 2 item 1
Output
item 1 item 2 item 10
Terms used in this tool
Text used for comparison
The tool checks for duplicates using a version of each line that reflects your whitespace, Unicode, and case settings. The line you see retains its original text.
Trim whitespace at both ends
Remove whitespace at either end of a line. Spaces inside the line and the order of the words stay as they are.
NFC
NFC is a way to write equivalent Unicode characters in the same form. It helps the tool match text that looks the same but is stored differently.
Sort by language
Sort using the language of the current page. That can give a different order from sorting by character code.
FAQ
Will my list stay in the same order?
The tool keeps the first copy of each line in its original order by default. You can also sort the results in ascending or descending order.
Can I ignore letter case in a multilingual list?
Yes. “Ignore case” follows the language of this page, so check the results if your list mixes languages.
What does ignoring whitespace at both ends do?
The tool ignores whitespace at the start and end of each line when checking for matches. For example, it can treat Alpha with spaces around it as the same as Alpha.
What will happen to the blank lines in my list?
The tool skips blank lines by default. Turn off “Skip blank lines” to include them. It will keep one if the list has several blanks.
Why might two lines that look alike stay in my list?
Yes. Some differences remain after NFC normalization. Check for zero-width characters or differences between fullwidth and halfwidth letters.
Where is my list processed?
Your browser does the work. The input and result stay out of the URL.
Notes
- “Ignore case” follows the language of this page. Check your results if the list mixes languages.
- The tool leaves zero-width characters and differences in character width as they are. Try the Invisible Character Checker if two lines look the same.
- The tool always keeps the first copy of a repeated line.