Text Tools
Remove duplicate lines
Strip repeated lines and keep the first occurrence of each, in the order they appeared.
- Free, no signup
- No upload — runs on your device
- No watermark
- Unlimited use
Remove Duplicate Lines
Processed locallySorting to deduplicate destroys information you may need
The classic Unix one-liner for deduplication is sort | uniq, and it works because uniq only removes adjacent duplicates. Sorting first brings them together. It also destroys the original order, permanently.
That matters more often than people expect. A list of URLs in crawl order, a list of errors in the sequence they occurred, a list of names in the order they signed up — the order is data, and sorting throws it away to work around a limitation of a 1970s utility. Deduplicating with a hash set, as this tool does, removes repeats while keeping every remaining line exactly where it was.
Case insensitivity is the other thing worth turning on. Email lists, URL lists and tag lists routinely contain the same value in three capitalisations, and an exact-match dedupe keeps all three.
How it works
- Paste your list
- Choose whether to ignore case, spaces and blank lines
- Copy the deduplicated result