Skip to content
CaseConverterHQ

Remove extra spaces

Collapse runs of spaces and tabs to one, trim the ends of every line, and remove the blank lines at the top and bottom. Line breaks inside the text are left where they are.

Change the case

Programmer cases

Lines and spacing

Paste some text and choose a conversion.

Words
0
Characters
0
No spaces
0
Sentences
0
Paragraphs
0
Lines
0
Read time
0 sec

Nothing you paste leaves your browser — every conversion runs on this page. Check this before you rely on it. This text converter is provided free and without warranty, and its results are not professional advice.

The double space after a full stop

Two spaces after a sentence is a typewriter habit. Monospaced type gave every character the same width, so a wider gap was needed to mark a sentence boundary; proportional type does that spacing itself, and every current style guide — Chicago, AP, MLA, APA since its seventh edition — specifies one space.

It is also the single most common thing in pasted text: a document written by someone who learned to type in 1985, or one that has been through three editors with different habits. Collapsing it is safe, because no current convention asks for two.

The whitespace you cannot see

Trailing spaces at the end of a line are invisible until they break something — a diff that shows a change where nothing changed, a Markdown line that turns into a hard break because it ended with two spaces, a CSV field that no longer matches on comparison.

Tabs are the other invisible: pasted from a spreadsheet or a code editor, a tab looks like several spaces but is one character, and it will not match a space in a search. This tool collapses tabs and spaces together, so mixed indentation comes out as single spaces.

One thing it leaves alone is the non-breaking space, U+00A0, which arrives with text copied from web pages and word processors. It looks exactly like a space and behaves like a letter, which is why a search for two spaces sometimes finds nothing in text that visibly has them. If a gap survives this tool, that is almost certainly what it is.

Worked example

Before

   The  report   was  late.    Again.  

  We  fixed  it.   

After

The report was late. Again.

We fixed it.

Common questions

How do I remove double spaces from text?

Paste it in and click Remove extra spaces. Every run of spaces or tabs is collapsed to a single space and each line is trimmed at both ends.

Does it remove line breaks as well?

No. Line breaks inside the text are preserved, so paragraph structure survives. Only blank lines at the very start and end are dropped.

Should there be one space or two after a period?

One. Two spaces was a fix for monospaced typewriter output; every current style guide, including Chicago, AP, MLA and APA, specifies a single space.

Other text tools