Whitespace cleaner

Processed in this browser

Text limit: 2000000 characters

This tool never uploads your input.

A paste from Word or Slack full of double spaces and empty lines. Run this before a line-dedup. Do not run it on a Makefile.

A stakeholder paste with three spaces after every period and a forest of blank lines. This page squeezes whitespace. It is not Prettier.

Code belongs on code beautify, SQL, or JSON formatter. Lists go to line deduplicator. Surgical edits: find and replace.

Paste from a spreadsheet

A form letter full of doubled spaces and blank lines. Do not run this on Python — indentation is syntax. Word/token replace is find-replace. Duplicate lines are the deduplicator. Character limits after cleaning go to the word counter (not X’s official weights).

How to use it

  1. Paste prose or a ragged list.
  2. Clean. If you needed to keep a blank line between sections, copy those back.
  3. Keep code out of this box.

Honest limits

Not Unicode whitespace class complete for every script. Not a legal redline.

FAQ

Will this break Python?

Yes, if you collapse leading indentation. Use a real formatter for code.

Tabs versus spaces?

Treat mixed indents as a code problem. This page is for prose and lists.

Non-breaking spaces from Word?

Those are a common reason a ‘space’ will not match in find-replace. Cleaning here often helps.

Deduplicate lines too?

That is the line sorter / deduplicator. Clean first if spaces made two ‘same’ lines look different.

Is the text uploaded?

No.

Related tools