Skip to content

Remove extra spaces

Collapse double spaces, trim the start and end of lines, convert tabs and non-breaking spaces, and remove invisible characters, all in one pass.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Paste the messy text.
  2. Pick the cleanups you want (the common ones are on by default).
  3. Check how many characters were removed.
  4. Copy or download the clean text.
Try it now

What each option does

OptionDefaultEffect
Collapse multiple spaces into oneonword␣␣␣word → word␣word
Trim spaces at line start and endonRemoves leading and trailing spaces on every line
Convert tabs to spacesonEach tab becomes one space
Convert non-breaking and special spacesonNon-breaking, thin, em and other Unicode spaces become normal spaces
Remove invisible charactersonDeletes zero-width spaces, joiners, byte order marks and soft hyphens
Remove all spacesoffDeletes every space and tab (line breaks stay)
Remove punctuation and symbolsoffDeletes . , ; ! ? quotes, brackets, $, %, emoji and similar
Remove digitsoffDeletes every number character

Line breaks are always preserved, so lists stay lists. The note under the result shows how many characters shorter the text became.

Where messy whitespace comes from

  • Copying from PDFs and web pages, which often brings double spaces, tabs from table layouts and non-breaking spaces.
  • Word processors, where people used spaces to line things up.
  • Spreadsheets and databases, with leading or trailing spaces in cells that break lookups and matching.
  • Chat apps and AI tools, which sometimes insert invisible characters.
  • Typing habits, like two spaces after a period.

Invisible problems are the nastiest: a trailing space or a zero-width character makes apple and apple look identical but fail to match in a VLOOKUP, a login form or a search. A pass through this tool fixes that.

Spaces after periods

Some people were taught to type two spaces after a period. Most modern style guides, including AP and Chicago, call for a single space, and on the web extra spaces are usually collapsed anyway when a page is displayed. With Collapse multiple spaces into one on, the tool converts double spaces after sentences to single spaces along with every other run of spaces.

Stronger cleanups

The off-by-default options are for special jobs:

  • Remove all spaces turns AB 12 CD into AB12CD, handy for codes, IBANs, card or phone numbers copied with spaces.
  • Remove punctuation and symbols leaves only letters, digits and spaces, useful before counting words in a special way, or preparing text for simple matching.
  • Remove digits strips numbers out of names or labels.

Combine them as needed, and check the result before you replace the original. For targeted edits, such as removing only dollar signs or only a certain word, find and replace gives you more control.

Related tools

Cleaning runs in your browser and nothing is uploaded.

Frequently asked questions

How do I remove double spaces from text?

Paste the text. “Collapse multiple spaces into one” is on by default, so double and triple spaces become single spaces immediately.

How do I remove all spaces?

Turn on “Remove all spaces”. Every space and tab is deleted; line breaks are kept.

What is a non-breaking space?

A space character (U+00A0) that prevents a line break. It looks like a normal space but doesn't match one in searches, so the tool converts it.

Will it remove line breaks?

No. Line breaks are kept. Use the remove line breaks tool to join lines.

Is the text uploaded?

No. The cleanup runs in your browser.

Last updated: November 12, 2026

Recommended

Similar tools

If Remove extra spaces helped, you may need these too.

See all in category →

People also use