Text Tools

Remove extra spaces.

Paste text and clean up its spacing: turn runs of spaces into one, trim each line, convert tabs and non-breaking spaces, tidy blank lines, and pull stray spaces out from before punctuation.

Advertisement

Input

Result

Paste text to clean its spaces.

About this extra space remover

Pasted text often carries double spaces after full stops, tabs from a spreadsheet, spaces at the end of lines, and invisible non-breaking spaces from web pages. This tool normalises them while keeping your line breaks, which is the difference from Remove Line Breaks, whose job is to join lines.

Worked example

  This   text  has    extra   spaces .  

With the defaults the result is This text has extra spaces .. Tick Remove spaces before , . ; : ! ? and it becomes This text has extra spaces.

What counts as a space

The space character, tab, the no-break space (U+00A0), and the other Unicode horizontal spaces: en and em spaces, thin space, narrow no-break space (U+202F), ideographic space (U+3000) and similar. All are turned into a normal space when collapsed. Zero-width characters are not spaces and are left alone.

Limits

The punctuation option is meant for English; it should not be used on French text, where a space before : ; ! ? is standard typography. Spaces inside code, tables and fixed-width text can be meaningful, so leave collapsing off for those. Input is limited to 5 MB and stays on your device.

FAQ

How do I remove double spaces from text?

Paste the text and keep "Replace runs of spaces with a single space" ticked. Every run of two or more spaces becomes one.

Will it remove line breaks too?

No. Line breaks are kept. To join lines into one paragraph use the Remove Line Breaks tool.

Does it remove non-breaking spaces?

It converts them to ordinary spaces and collapses repeats, which fixes the odd gaps you get when copying from web pages.

Advertisement
Advertisement