Text cleaner

0Characters
0Words
0Lines
0Paragraphs
Clean
Input
Output
Nothing leaves your browserPrivacy

What each option removes

Extra spaces
Collapses runs of spaces and tabs to a single space. Line breaks are left alone.
Trim lines
Removes leading and trailing whitespace from every line.
Blank lines
Collapses runs of empty lines to a single blank line, keeping paragraph breaks.
Line breaks
Joins everything into one paragraph. Use it on text copied out of a PDF.
HTML tags
Strips anything between angle brackets and keeps the text.
Smart quotes
Converts curly quotes, curly apostrophes and dashes to their plain equivalents.
Invisible characters
Removes zero-width spaces and joiners, and converts non-breaking spaces to ordinary ones.
Duplicate lines
Keeps the first occurrence of each line and drops later repeats. Blank lines are kept.

Order of operations

Options apply in the order listed, so trimming happens before blank lines are collapsed and duplicates are removed last. Selecting several at once is normal, and the output updates as you type.

Invisible characters are the usual cause of a paste that looks clean but breaks a form validator or a spreadsheet import.

Questions

How do I remove line breaks from text copied out of a PDF?

Turn on Line breaks, which joins the text into one paragraph, then Extra spaces to collapse the gaps the join leaves behind.

What are invisible characters and why do they matter?

Zero-width spaces, joiners and non-breaking spaces are copied invisibly from web pages and documents. They look like nothing but break form validation, search matching and spreadsheet imports.

Related tools