Remove Extra Spaces
Tidy the spacing of any text in one step. Collapse double and multiple spaces, turn tabs into spaces, remove spaces before commas and full stops, and trim the start and end of every line.
- Runs in your browser
- No sign-up
- Free to use
How to use Remove Extra Spaces
- Paste your text into the left box.
- Choose which fixes to apply; the common ones are already ticked.
- Check the count of spaces removed under the text.
- Copy or download the corrected text.
Remove Extra Spaces features
Collapse multiple spaces
Any run of spaces becomes a single space.
Tabs to spaces
Replace tab characters that cause uneven gaps.
Punctuation spacing
Remove stray spaces before commas, full stops and other punctuation, and optionally add a missing space after them.
Trim lines
Delete spaces at the beginning and end of each line.
Non-breaking spaces
Treat special spaces from web pages and Word as ordinary spaces.
Line breaks kept
Only horizontal spacing is changed; paragraphs stay as they are.
When to use Remove Extra Spaces
- Fixing text typed with two spaces after each full stop.
- Cleaning justified text copied from PDFs.
- Tidying data pasted from spreadsheets with tab characters.
- Preparing copy for publishing where double spaces show as gaps.
- Normalising spacing before comparing two texts.
Remove Extra Spaces FAQ
Should there be one or two spaces after a full stop?
One. Two spaces were a typewriter convention; modern style guides and typography use a single space.
Does this remove line breaks?
No. Only spaces and tabs are affected. Use Remove Line Breaks or Remove Empty Lines for those.
Why are some spaces not removed?
They may be special space characters such as non-breaking spaces. Keep the non-breaking spaces option ticked, or use the Text Cleaner for other invisible characters.
Will adding spaces after punctuation break URLs or decimals?
The option adds a space only after commas, semicolons, colons, question and exclamation marks followed by a letter, and after a full stop followed by a capitalised word, which leaves numbers such as 3.14 and most web addresses alone. Review the result if your text contains many abbreviations.
Is indentation preserved?
Trimming removes leading spaces, including indentation. Untick Trim spaces at line starts and ends to keep it.
Where extra spaces come from
Extra spaces sneak into text in predictable ways. People trained on typewriters put two spaces after each sentence. Text copied from justified PDFs contains runs of spaces used to stretch lines. Spreadsheet data arrives with tabs between columns. Web pages contain non-breaking spaces that look ordinary but are not.
On a web page the browser collapses repeated spaces when displaying text, so the problem may be invisible until the text is used elsewhere: in an email, a printed document, a database field or a search. There, double spaces show up as uneven gaps or cause two apparently identical values not to match.
Spaces before punctuation are another common artefact, especially in text translated from French, where some punctuation is preceded by a space, or text produced by speech recognition and OCR.
Cleaning spacing is usually the first step before further processing. Once spaces are consistent, comparing versions, removing duplicates and importing into other systems all become more reliable.