Remove Extra Spaces & Line Breaks
Paste text that's picked up messy spacing — from a PDF, an email, or a formatted document — and strip the extra spaces, tabs and blank lines so it's clean before you paste it somewhere else.
How it works
Tabs are converted to spaces, each line is optionally trimmed of leading and trailing whitespace, repeated spaces are collapsed to one, and runs of three or more blank lines are collapsed to a single blank line — each step can be switched off individually.
Worked example
Text copied from a PDF that reads "This is a sentence." with inconsistent gaps becomes "This is a sentence." with a single space between each word.
Cleaning text before pasting it into a CMS, an email, or a document also avoids a subtler problem: some platforms preserve extra spaces exactly as pasted, which can throw off formatting or search matching later even though the extra spaces are invisible at a glance.
Common questions
What does "collapse repeated spaces" do?
It turns any run of two or more spaces into a single space, which is the most common mess left behind by copy-pasting from PDFs or formatted documents.
What does "collapse blank lines" do?
It shrinks any run of three or more line breaks down to a single blank line, so paragraphs stay separated without large empty gaps.
Does this remove tabs too?
Yes, tab characters are converted to spaces before any other cleanup runs.
Will this change the words themselves?
No, only whitespace is affected. Letters, numbers and punctuation are left exactly as typed.
Why do PDFs create this kind of messy spacing in the first place?
PDFs store text by position on the page rather than as a flowing document, so copying text out of one can insert extra spaces or line breaks wherever the original layout had gaps — column breaks, justified text, or table cells are common culprits.