Skip to content

Remove Extra Spaces

Remove double spaces, trailing whitespace, and blank lines from text online. Free whitespace cleaner that keeps your paragraphs intact.

This tool collapses runs of two or more spaces or tabs into a single space, trims whitespace from the start and end of every line, and reduces runs of blank lines to one. Line structure and paragraph breaks are preserved.

Examples

InputOutput
Too many spaces here.Too many spaces here.
padded line nextpadded line next

When to use the remove extra spaces

Stray whitespace is invisible until it breaks something. Common sources:

  • The two-space rule. Typists trained on monospaced typewriters put two spaces after a full stop. Every modern style guide — Chicago, APA, MLA — now specifies one, and proportional fonts space sentences correctly on their own.
  • Copy-paste from the web, which drags along indentation, non-breaking spaces, and trailing tabs.
  • Data entry. A trailing space in a spreadsheet cell means "Paris " never matches "Paris", silently corrupting lookups and joins.
  • Git diffs. Trailing whitespace produces noisy diffs and many linters reject it outright.

Unlike the remove line breaks tool, this one keeps your line structure. Each line is trimmed and internally normalised, and consecutive blank lines collapse to a single blank line, so paragraph boundaries survive.

Frequently asked questions

Does it remove the line breaks too?

No. Line structure is preserved. It only collapses runs of spaces and tabs within each line, trims each line, and reduces multiple blank lines to one.

Should I use one space or two after a full stop?

One. Chicago, APA, and MLA all specify a single space. The two-space convention comes from monospaced typewriters and is unnecessary with proportional fonts.

Does it remove non-breaking spaces?

Non-breaking spaces pasted from web pages are treated as whitespace and collapsed along with regular spaces.