Remove Extra Spaces
Clean up text pasted from PDFs, Word, or email — collapse repeated spaces, trim stray whitespace, and fix invisible characters like non-breaking spaces — instantly, in your browser.
A word about pasted-from-PDF text with weird gaps in it, cleaned up: this tool collapses double spaces, trims stray whitespace, and fixes invisible characters like non-breaking spaces that sneak in from PDFs and Word documents — instantly, in your browser.
How this works
Text copied from a PDF, Word document, or email often contains invisible problems a normal find-and-replace won’t catch: non-breaking spaces (which look identical to regular spaces but behave differently), zero-width characters left over from formatting, and inconsistent tabs mixed with spaces. This tool fixes all of it and tells you exactly what it changed, rather than silently altering your text.
Line breaks are never touched here — if you need to join wrapped lines back into paragraphs, that’s a separate tool (Remove Line Breaks).
Why does my pasted text have weird spaces?
PDFs, Word, and some email clients insert non-breaking spaces, extra tabs, or invisible formatting characters that look normal but aren’t regular spaces — this is especially common in text copied from a PDF.
What is a non-breaking space?
A non-breaking space looks identical to a regular space but prevents a line from wrapping at that point — commonly inserted automatically by word processors and PDF exports. It can cause subtle bugs when pasted elsewhere, which is why this tool replaces it with a regular space.
What are zero-width characters?
Zero-width characters (like zero-width spaces or joiners) are invisible characters with no visual width — they don’t show up when you look at the text, but they’re still there, and can interfere with search, sorting, or word counts. This tool detects and removes them.
Will it break my paragraph breaks?
No. Line breaks are left completely untouched by this tool — only spaces, tabs, and invisible characters are cleaned. Joining wrapped lines into paragraphs is a separate tool.
Is my text uploaded anywhere?
No. This tool runs entirely in your browser — your text is never sent to a server, uploaded, or stored anywhere.