Remove Extra Spaces
Clean up double spaces, stray tabs and ragged indentation without wrecking your paragraphs.
Runs in your browser — nothing you type is sent anywhere
Line breaks are never treated as ordinary spaces, so your paragraphs stay intact instead of being joined into one block.
Result
The result appears here as you type. Nothing is sent anywhere — the work happens in this page.
About the Remove Extra Spaces
Text copied out of a PDF, an email chain or a web page arrives full of whitespace that is not really there: double spaces between sentences, tabs used for indentation, trailing spaces at the end of every line, and runs of blank lines where a page break used to be.
The obvious fix is to replace every run of whitespace with a single space, and it is wrong. That treats line breaks as whitespace too, so the entire document collapses into one unbroken paragraph. This tool handles horizontal spacing and vertical spacing separately, which is why your paragraphs survive.
Each cleanup is a separate switch, so you can apply only what you need. Collapsing repeated spaces fixes the double-space problem. Trimming lines removes the invisible spaces at the start and end of each one, which is what makes pasted text misalign. Blank lines can either be collapsed to a single break or removed entirely, depending on whether you want paragraphs or a continuous block.
The result updates as you type and shows how many characters of whitespace were removed. Nothing you paste is sent anywhere, so a confidential document is safe to tidy up here.
How to use the Remove Extra Spaces
Paste the messy text
Anything copied from a PDF, a slide deck or an email usually has the problem. Paste it into the box on the left.
Choose what to clean
Turn on only the fixes you want: repeated spaces, line trimming, and how blank lines should be treated.
Check the paragraphs survived
The result appears on the right. Line breaks between paragraphs are preserved unless you specifically ask for blank lines to be removed.
Copy the clean version
Copy it to your clipboard or download it as a text file, ready to paste wherever it is going.
Frequently asked questions
Will this join all my paragraphs into one block?
Why does text copied from a PDF have such odd spacing?
What is the difference between collapsing and removing blank lines?
Does it remove tabs as well as spaces?
Is my text uploaded?
You may also need
Remove Duplicate Lines
Strip repeated lines from a list while keeping the original order intact.
Word Counter
Count words, characters, sentences and paragraphs as you type — with reading time.
Case Converter
Switch text between sentence case, title case, camelCase, snake_case and eight more.
Text Sorter
Sort lines alphabetically or by number, reverse them, or shuffle them at random.