How to use the Remove Duplicate Lines
- Paste your list
- Choose the options
- Copy the list without duplicates
Clean up a list in one step
Paste a list and duplicate lines are removed instantly, keeping the first copy of each line in its original order. Options: Ignore case (so โAppleโ and โappleโ count as the same), Trim spaces, Remove empty lines and Sort A โ Z. You see how many lines were removed. Useful for lists of emails, keywords, URLs or names.
From a text file
Open the file, copy everything, paste it here, then copy the result back. Nothing is uploaded.
In other programs
- Excel โ Data โ Remove Duplicates.
- Notepad++ โ Edit โ Line Operations โ Remove Duplicate Lines.
- VS Code โ run โDelete Duplicate Linesโ from the Command Palette (Ctrl + Shift + P).
- Sublime Text โ Edit โ Permute Lines โ Unique.
- Vim โ
:sort u(this also sorts the lines).
On Linux
sort -u file.txt removes duplicates but changes the order. To keep the original order, use awk '!seen[$0]++' file.txt โ the same thing this page does.
Lines in drawings
Duplicate lines in CAD and design files are a different problem: in AutoCAD the OVERKILL command deletes overlapping geometry, and in Illustrator you can select overlapping paths and merge them with Pathfinder.