Skip to content

Tool 15 / Clean up

The gaps are the problem.

Double spaces after a paste, tabs where a tab should not be, invisible non-breaking spaces, blank lines that multiply. Fix the spacing without rewriting the words.

  • Free to use
  • Five modes
  • Runs locally
Live workbenchClean up spacing

Collapse runs, trim edges, and fix blank lines without touching words.

Spacing options
Cleaned text
4 lines in4 lines out24 characters removedNever uploaded

What it does

Spacing damage is the most common kind of text damage. A sentence copied from a PDF arrives with three spaces after a period. A column copied from a spreadsheet brings tabs and trailing spaces. A web page supplies non-breaking spaces that look like spaces but refuse to break and defeat a later search. None of it is visible in a glance, and all of it can break a paste into a form, a CMS, or a code editor.

This tool changes only whitespace. It does not touch letters, punctuation, capitalization, or line order. You can collapse runs of spaces, trim the edges of every line, convert tabs, replace non-breaking spaces, and manage blank lines. The original remains in the left pane so you can compare and undo by turning an option off.

Five spacing modes

Clean up spacing
The everyday mode. Collapses repeated spaces to one, trims each line, and can convert tabs, replace non-breaking spaces, and remove or reduce blank lines. Words and punctuation are untouched.
Remove every space
Deletes spaces and tabs entirely while keeping the line structure. Useful for creating a compact identifier or a puzzle string. It is destructive for ordinary prose: the words run together.
Double space
Puts exactly two spaces between words. Some manuscript and style guides still ask for this. Existing runs are collapsed first, so the result has a consistent two-space gap rather than inherited variation.
Custom spacing
Uses any string as the gap between words: three spaces, a bullet, a slash, a visible marker. The separator is inserted between words, not inside them.
Space between letters
Turns “hello” into “h e l l o”. Useful for display headings and word puzzles. It is not the same as kerning or letter-spacing in CSS; the output contains literal space characters.

What is left alone

The tool removes or changes whitespace, and nothing else. It does not remove punctuation, change quotes, strip HTML, correct spelling, or alter capitalization. If you need those jobs, use Clean Text for a broader pass or Remove Punctuation for punctuation specifically.

Line breaks are preserved in cleanup modes. You can remove blank lines, but the line breaks that separate non-empty lines survive. To merge lines into a paragraph, use Merge Lines; that is a different operation and it is easier to reason about when it has its own control.

Examples

A pasted paragraph
Collapse, trim, tabs on

Before

  The  report   is due on Friday.   
We   need   three   copies.  

After

The report is due on Friday.
We need three copies.

The runs collapse, the trailing spaces disappear, and the line break stays. If the two lines were one sentence split by a PDF, use Merge Lines after this pass.

Tab-separated values
Tabs off · trim on

Before

SKU-001	Blue widget	12
SKU-002	Red widget	8

After

SKU-001	Blue widget	12
SKU-002	Red widget	8

With tabs left alone, the columns survive. Turning “convert tabs to spaces” on here would replace the delimiter and destroy the table structure. The trim option only touches the edges of each line.

Two spaces between sentences
Double-space mode

Before

First sentence. Second sentence. Third sentence.

After

First sentence.  Second sentence.  Third sentence.

The spaces are placed between words, so the two spaces appear after the period because the period is attached to the previous word. This is a formatting choice, not a grammar rule; many modern style guides prefer a single space.

Limits worth knowing

  • Whitespace can be meaningful. Indentation is whitespace. Collapsing spaces or converting tabs will change the meaning of code, YAML, and tab-separated data. Use the tab option deliberately and check the result.
  • “Remove every space” is not reversible from the output. The original stays in the input pane, but the output cannot tell you where the spaces were.
  • Non-breaking spaces are not the same as spaces. The replacement option handles them, but if it is off, a run that looks like a double space may include a non-breaking space and will not collapse the way you expect.
  • Blank-line handling is separate from line joining. Removing blank lines does not join the surviving lines. A paragraph with a blank line inside becomes one block only if you choose the join operation elsewhere.
  • Nothing is stored. A refresh clears the input and settings. Copy the result before leaving the page.

Page updated

Questions, answered

What is the difference between “collapse” and “remove every space”?

Collapsing turns a run of spaces into one space, so words stay separate. Removing every space deletes the characters entirely, so “two words” becomes “twowords”. The first is a cleanup; the second is a deliberate transformation used for passwords, identifiers, and puzzles.

Does it remove blank lines?

Only if you ask. By default, blank lines are left in place. You can remove them entirely or keep at most one between paragraphs. That second option is usually what people want after copying text that has accumulated three blank lines between every paragraph.

Are tabs converted to spaces?

Yes, when the option is on. It is on by default because tabs are a common source of uneven gaps after a paste. Turn it off for tab-separated data and for code, where a tab is part of the structure rather than a stray gap.

What about non-breaking spaces?

They are replaced with ordinary spaces when the option is on. Non-breaking spaces look identical to normal spaces but behave differently: they prevent a line break, and they make search and replace fail. Replacing them is usually safe for prose and worth doing before a comparison.

Can I add spaces instead of removing them?

Yes. Switch to double spacing, custom spacing, or space-between-letters. Double spacing is a manuscript convention; custom spacing is useful for stylized headings; letter spacing turns a word into a run of separated characters. The cleanup modes and the spacing modes share the same input.

All tools →