Text Cleaner

Strip stray spaces, line breaks and formatting from copied text.

Fix text that arrived broken

Text copied from a PDF, an email or a web page usually arrives with line breaks in the wrong places, double spaces and trailing whitespace. Pasting it into a document or a form produces something that looks wrong and is annoying to fix by hand.

Paste the text and choose what to clean.

The cleanup options

  • Trim each line. Removes spaces at the start and end.
  • Collapse spaces. Turns runs of spaces into one.
  • Remove empty lines. Deletes blank lines.
  • Remove all line breaks. Joins everything into one paragraph.
  • Fix single line breaks. Joins wrapped lines but keeps paragraph breaks.

Which one to use

Pasting into a CMS. Fix single line breaks. You keep paragraphs and lose the arbitrary wraps.

Pasting into a spreadsheet cell. Remove all line breaks.

Cleaning a list. Trim each line and collapse spaces, but keep the line breaks so the list stays a list.

Preparing for word count. Collapse spaces and remove empty lines first, otherwise the count is inflated.

A quick check

After cleaning, read the first and last line. Cleanup tools can join a heading into the paragraph below it. That is easy to miss and easy to fix manually.

For length checks after cleaning, use Word Counter. For capitalisation, Case Converter is the next step.

Questions

Frequently asked

Does it change the words themselves?

No. It only touches whitespace and line structure unless you choose the case options.

Why does pasted text have so many line breaks?

Copying from a PDF or a web page often carries the visual line breaks of the source. They are not paragraph breaks, they are just where the line ended on screen.

Can I keep paragraph breaks but remove single line breaks?

Yes. Use the remove single line breaks option, which keeps blank lines and joins wrapped lines.

Is my text stored?

No. Cleaning happens in your browser.