Tool 10

Whitespace Cleaner

Trim, collapse, and tidy up messy spacing in one click.

Clean up whitespace

Trims each line and collapses repeated spaces.

10 / no login
Cleaned
Your cleaned text appears here.

How the whitespace cleaner works

Paste your text and press "Clean text." The tool trims leading and trailing spaces from every line and collapses repeated spaces down to one, so text pasted from PDFs or old documents doesn't come out riddled with gaps.

Leave "Also remove blank lines" checked to squeeze out empty lines too, or uncheck it if you want to keep paragraph breaks.

Common uses

  • Cleaning up text copied from a PDF or scanned document
  • Fixing spacing left behind by a broken export or copy-paste
  • Prepping text before pasting it into code or a config file
  • Tidying a list that has inconsistent spacing between entries

FAQ

Does it remove spaces inside words?
No — only extra spaces between words and at the start/end of lines are affected. Word contents are untouched.
Will it change line breaks I want to keep?
Only if "Also remove blank lines" is checked. Leave it unchecked to preserve paragraph spacing.
Is my text saved anywhere?
No. Cleaning happens locally in your browser and nothing is uploaded.