AnyFormat

00 Utility

Remove Duplicate Lines

Keeps the original order. Can also show you only the duplicates.

01Input
02Output
03Options 5
  • No upload The conversion runs in this tab. Your file never travels — not to us, and not to the advertising.
  • No sign-up, no email, no daily cap There is no account system to sign up to.
  • No size limit we invented Only your device's memory — about ~2 GB on a desktop browser, ~400 MB on a phone.
  • Turn your Wi-Fi off and convert anyway The conversion needs nothing but this page. Ads will not load without a connection; your file will still convert. That is the whole claim, and it takes five seconds to check.

Removes duplicates while keeping the original order — which is the difference between this and piping through sort -u, and it matters when the order carries meaning.

Three different questions

Deduplicated list — every distinct line, once. The usual job: cleaning an email list, a set of IDs, a log of URLs.

Only lines that repeat — the answer to "what is duplicated in here?", which is a different question and one that a deduplicating tool cannot answer.

Only lines that appear once — the answer to "what is in one list and not the other?" when you have concatenated two lists. Combined with case-insensitivity this catches near-duplicates that a naive comparison misses.

Case and whitespace

Comparison ignores case and surrounding whitespace by default, because ADA@EXAMPLE.COM and ada@example.com are the same address and treating them as different is how a "deduplicated" mailing list still sends two copies. The output preserves the original text of whichever occurrence was kept.

Which copy survives, and why order is kept

The first occurrence of each line stays where it was and every later copy is dropped, so the output is your file with holes in it rather than a reordered list. That is the difference between this and the usual command-line habit of sort | uniq, which only works because sorting brings duplicates next to each other and destroys the original order as a side effect. Keeping position matters when the order carries meaning — a log, a playlist, a list of steps — and it is the reason a file that was already sorted comes out looking untouched apart from the removals.

Other names for this

Also searched as “dedupe lines”, “delete duplicate lines”, “unique lines”.

Questions

Does it sort the lines?
No. The original order is preserved, unlike sort -u.
Are “Apple” and “apple” the same line?
By default yes. Turn on “Case-sensitive” to treat them as different.
Does my text leave the browser?
No. Everything runs as JavaScript in this tab — there is no server involved and no request is made. Open the Network panel and watch, or turn your Wi-Fi off and keep using the tool.