Skip to content

Whitespace Cleaner

Remove extra spaces, tabs and blank lines, fix non-breaking spaces and join broken lines from PDFs.

Spaces

Remove spaces at the start and end of each line

Turn repeated spaces and tabs into one space

Non-breaking spaces → normal; remove zero-width spaces

Runs in your browser — nothing you enter is sent to a server.

How the Whitespace Cleaner works

Paste messy text and choose what to clean. By default the cleaner trims spaces at the start and end of every line, turns repeated spaces and tabs into one space, keeps at most one empty line in a row, and removes empty lines at the very start and end.

Fix special spaces replaces non-breaking and other unusual spaces with normal ones and removes invisible zero-width spaces, which often sneak in when copying from web pages and documents. Zero-width joiners are kept, because emoji like 👩‍👩‍👧 and several writing systems need them.

Examples

Double spaces and trailing spaces

Hello world → Hello world: 7 characters removed

Text copied from a PDF

With Join lines within paragraphs, lines like “This is a” / “broken line.” become This is a broken line., while empty lines between paragraphs stay.

Frequently asked questions

What's a non-breaking space?

A space (U+00A0) that stops a line break between two words, for example in “10 kg”. It looks like a normal space, but searches, spreadsheets and code often treat it differently.

Will it change my paragraphs?

No, unless you choose to join lines. Paragraph breaks (empty lines) are kept; only runs of several empty lines become one.

Does it clean code indentation?

Trimming and collapsing remove indentation, so turn off Trim lines and Collapse spaces for code, or use a code formatter instead.

Case Converter

Change text to UPPERCASE, lowercase, Title Case or Sentence case, or to camelCase, snake_case and kebab-case for code.

Text Tools

Remove Duplicate Lines

Delete repeated lines from a list, keeping the first occurrence and the original order.

Text Tools

Word Counter

Count words, characters, sentences and paragraphs as you type, with reading and speaking time.

Text Tools

Also in Tools for Writers.