KitJade
Developer ToolsRuns in your browserNew

Whitespace Remover

Trim, collapse and remove unwanted whitespace.

Use the Whitespace Remover tool

Runs in your browserUpdated Report a problem

What this whitespace remover does

Whitespace Remover fixes the invisible characters that break pasted text: trailing spaces, doubled spaces, blank lines and hard-wrapped line breaks copied from a PDF. Each operation is explicit, so you can apply only the one you need.

The tool reports input and output size in bytes, which makes it obvious how much of a pasted document was padding. Nothing is rewritten unless you enable that option.

Why use it

  • Clean text copied from a PDF before pasting it into a CMS.
  • Turn hard-wrapped lines into a flowing paragraph.
  • Remove stray spaces that break CSV or code comparisons.

How to use it

  1. 1Paste the text.
  2. 2Enable the clean-up operations you want.
  3. 3Copy the cleaned result; the byte difference shows what changed.

Worked examples

Collapse spaces

Input

Too    many     spaces

Output

Too many spaces

Join lines

Input

A sentence split
across two lines

Output

A sentence split across two lines

Common mistakes

  • Collapsing whitespace inside code or Markdown where indentation is meaningful.
  • Joining lines in poetry or addresses where the break carries meaning.
  • Assuming a non-breaking space behaves like a normal space; it is a different character.

Frequently asked questions

Does it remove tabs?
The collapse option treats runs of spaces and tabs as one space. Trimming removes tabs at the start and end of each line.
Can I keep blank lines between paragraphs?
Yes. Leave the remove-blank-lines option off and use collapse to reduce repeated spaces only.
Is the change reversible?
No. Keep the original text if you might need its exact spacing, especially for code.
All tools