Kastavo

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

This website uses cookies

We use cookies to improve your experience and understand how the site is used. You can change this choice anytime in Cookie Preferences. See our Privacy Policy.