Remove Duplicate Spaces and Lines
Paste your text, pick the options you want, and watch the result update in real time, ready to copy.
Processed locally in your browser.
Not sure? Turn your internet off and try — it still works.
How it works
Great for tidying up lists exported from spreadsheets, text pasted from PDFs or e-mails, and anything with inconsistent spacing. Each option works independently: combine "remove duplicate spaces" with "remove duplicate lines" at the same time, or use just one of them. Removing duplicate lines always keeps the first occurrence of each line, in its original position — nothing gets reordered. The steps always run in this order: line breaks are standardized, repeated spaces become one, the ends of each line are trimmed, empty lines are removed (if you tick that option) and, last, the duplicates. That is why “apple ” and “apple” count as the same line when the ends are trimmed, which is the default. The comparison is exact: “Café” and “Cafe” are different lines, and “Café” and “café” only match with “Ignore case when comparing duplicates”; the one that appeared first is kept. The result comes out with plain line breaks, even if the pasted text came from Windows.
Frequently asked questions
Related tools
Clean Text
Normalize text pasted from Word, PDFs, or websites: quotes, dashes, spaces, and invisible characters.
Text
Sort Lines
Sort lists alphabetically (A-Z or Z-A) or numerically, one line at a time.
Text
Word and Character Counter
Count words, characters, lines, and paragraphs in real time, right in your browser.
Text