Remove extra spaces from text

Paste text with double spaces, tab-fattened gaps, or leftover justified-layout spacing, and collapse every run down to one space — or strip spaces out entirely if you need to. The same cleaner as the full tool, focused on spaces specifically.

Which option to use

For extra spaces specifically, you want Collapse multiple spaces into one, checked on its own. It turns any run of two or more spaces or tabs into a single space and leaves your line breaks exactly where they are — nothing else about the text changes.

Before
Double  spaces   after     sentences.  Tabs	also collapse.
After — Collapse multiple spaces
Double spaces after sentences. Tabs also collapse.

If you also want the text on a single line with no line breaks at all, add Remove line breaks from the full tool — the two options are independent and compose without conflicting. If you need to strip every space entirely, rather than just collapsing runs, use Remove all whitespace instead; see the FAQ below for when that is and is not what you want.

Frequently asked questions

What counts as an extra space?

Any run of two or more space or tab characters in a row. A single space between words is left alone; two spaces after a period, a tab used to fake alignment, or a block of spaces left over from a justified layout are all collapsed down to exactly one space.

Why does my pasted text have double spaces after every sentence?

Typewriter-era convention put two spaces after a full stop, and some word processors and monospaced-font documents still carry that habit, or insert extra spaces to justify a line so its right edge lines up. None of that survives copy-paste as intentional formatting — it just becomes literal extra space characters sitting in the text.

Does collapsing spaces also remove line breaks?

No — they are separate, independent options. Collapsing spaces only touches runs of horizontal whitespace (spaces and tabs) and never removes a newline. If your text also wraps every line and you want it on one line, turn on Remove line breaks as well; the two combine without conflicting.

What is the difference between collapsing spaces and removing all whitespace?

Collapsing spaces turns a run of repeated spaces/tabs into exactly one space, so words stay separated. Removing all whitespace deletes every space, tab and newline outright, so words run directly into each other. Use collapsing for readable text; use remove-all-whitespace only for a value that must contain no whitespace at all, like a pasted API key or hex colour.