Remove Extra Spaces
Text copied from PDFs, emails and web pages is often full of double spaces, tabs, invisible non-breaking spaces and stray spaces before commas. Paste it here to get clean, evenly spaced text in one go, with options for exactly what to fix.
How to Remove Extra Spaces From Text
Quick answer: paste your text; double spaces, tabs and stray spaces are cleaned up straight away. Tick Join broken lines for text copied from PDFs.
-
1
Paste your text
Or open a text file.
-
2
Choose what to fix
All the usual clean-ups are on by default.
-
3
Join lines if needed
Fix text copied from PDFs.
-
4
Copy or download
Use the clean text anywhere.
What You Get
Where Extra Spaces Come From
Extra spaces sneak in from many places. Some people type two spaces after a full stop. Text copied from PDFs and web pages carries hidden non-breaking spaces and tabs. Justified text and old word processors add runs of spaces to line things up, and copying from spreadsheets brings tabs between columns. The result looks untidy, breaks layouts and can make searching and matching text fail.
What Each Option Does
Trim lines removes spaces at the start and end of every line. Tabs into spaces replaces tab characters, and non-breaking spaces turns the invisible spaces used by web pages into normal ones, so every gap is treated the same. Runs of several spaces always become a single space. Spaces before punctuation removes the gap in "Hello , world !" to give "Hello, world!".
Join broken lines is for text copied from PDFs and emails, where each line ends with a line break even in the middle of a sentence. It joins those lines into flowing paragraphs while keeping the blank lines between paragraphs.
Other Clean-Up Tools
To delete blank lines too, use Remove Empty Lines. To remove repeated lines from a list, use Remove Duplicate Lines, and to count words after cleaning, the Word Counter gives an accurate total.
Example
You copy a paragraph from a PDF report and paste it into an email, but every line breaks halfway and some words have two or three spaces between them. Paste it here, tick Join broken lines, and you get one clean paragraph with single spaces, ready to paste back.
Who Needs to Remove Extra Spaces?
Writers and editors cleaning text pasted from PDFs, websites and old documents. Students preparing essays that must meet formatting rules. Data workers tidying names, addresses and product titles before importing them into spreadsheets or databases, where a stray space can make two identical entries look different. Developers cleaning strings and configuration values. Social media managers fixing captions where spacing went wrong after copying between apps.
Tips for Clean Text
Run Remove Extra Spaces first, then other clean-up tools: spacing problems can hide duplicates and make sorting look wrong. When joining PDF lines, check headings and lists afterwards, because a heading followed directly by text may be joined to it; add a blank line after headings before converting to keep them separate. Hidden non-breaking spaces are a common reason searches fail, so leave that option ticked.
Good to Know
Only spacing is changed: letters, numbers, punctuation and the order of your words are never touched. Line breaks are kept unless you tick Join broken lines, and blank lines between paragraphs are always kept, so the structure of your document stays the same. The tool recognises regular spaces, tabs and the non-breaking spaces that word processors and web pages use. Spaces inside the result are always single, which also makes the text count correctly in word and character counters.
Private, Free and Instant
The tool is free and cleans long documents up to 5 MB instantly. There is no sign-up, no limit and no watermark. The conversion runs entirely inside your browser, so your text is never uploaded, stored or shared, which makes the tool safe for emails, contracts, student work and anything confidential. It works the same on Windows, Mac, Linux, Chromebooks, iPhone and Android, and the result updates instantly as you type or paste. You can also open a text file from your device and download the converted text as a new .txt file.
Fixing Messy Spacing in Text
Double spaces, tabs and trailing spaces creep into text copied from PDFs and old documents. Removing extra spaces tidies the text and prevents problems when comparing or importing data.
Besides double spaces, look for non-breaking spaces and tabs, which look like spaces but behave differently. A clean text is easier to search, count and compare, and avoids layout problems when pasted into forms.
Frequently Asked Questions
Questions about removing extra spaces