Remove Line Breaks and Extra Spaces
Strip line breaks, collapse repeated spaces and clean up text pasted from PDFs or emails.
- Lines before
- 0
- Lines after
- 0
- Characters removed
- 0
This tool runs entirely in your browser. Nothing you enter is uploaded to a server.
Clean up text that arrived with the line breaks in the wrong places — copied out of a PDF, a plain-text email or a terminal. It can unwrap hard-wrapped paragraphs while keeping real paragraph breaks, collapse repeated spaces, and rejoin words hyphenated across lines. Your text stays in your browser.
How to use it
- Paste your textDrop in whatever you copied. The cleaned version appears immediately below.
- Choose what to cleanUnwrapping paragraphs is the usual choice. Tick Remove every line break if you want one continuous line instead.
- Copy the resultCopy result puts the cleaned text on your clipboard, or feed it back in to clean again.
The problem this solves
Copy a paragraph out of a PDF and paste it somewhere else, and it arrives shattered into a dozen short lines. Forward a plain-text email and the quoted text is wrapped at seventy-two characters whether or not that suits the new window. Paste output from a terminal and the wrapping belongs to a window size nobody else has.
In each case the words are right and the line breaks are wrong. Fixing that by hand means deleting one break at a time and hoping you do not remove a real paragraph boundary along the way.
How the cleanup decides what to keep
The important distinction is between a break that exists because a line ran out of room, and a break that means something. In practice, a blank line almost always signals a genuine paragraph boundary, while a single break inside a block is usually just wrapping.
Unwrapping uses exactly that rule: split the text on blank lines, join the lines within each block, then put the paragraph breaks back. The result reflows naturally in whatever you paste it into, and the author's structure survives.
The one case no tool can resolve is text that separates paragraphs with a single break and no blank line, because that is indistinguishable from hard wrapping. If your source looks like that, remove the wrapping first and reinstate the paragraph breaks by hand.
The other options
Collapsing repeated spaces fixes the double spaces left behind by justified text and by old typing conventions. Trimming removes the leading indentation that copied code and quoted email tends to carry. Rejoining hyphenated wordsundoes typographic hyphenation, which is otherwise tedious to fix and easy to miss.
The counters above the result show how many lines went in, how many came out, and how many characters were removed — a quick way to confirm the tool did what you expected before you paste the result somewhere that matters.
Limitations
This is a whitespace tool. It does not correct spelling, fix broken encoding, or reconstruct formatting such as bold and italics, none of which survive a plain-text copy in the first place. Bulleted lists whose markers sit on their own lines may need a manual pass, since a list item and a wrapped line look identical once the formatting is gone.
Nothing you paste is uploaded, logged or kept. Close the tab and the text is gone.
Frequently asked questions
What is the difference between unwrapping and removing every break?
Unwrapping joins lines within a paragraph but keeps the blank lines that separate paragraphs, so the structure of the text survives. Removing every break collapses everything into one continuous line. Unwrapping is what you almost always want after copying from a PDF; removing everything is for when you need a single line, such as fitting text into one cell or one field.
Why does text from a PDF break in odd places?
A PDF stores where each piece of text is drawn on the page, not that it belongs to a flowing paragraph. When you copy, the reader inserts a line break at each visual line end. The result looks like a paragraph on the page and behaves like dozens of separate lines once pasted.
What does rejoining hyphenated words do?
PDFs and typeset documents often break a word across a line with a hyphen — "com-" at the end of one line and "mon" at the start of the next. Copying gives you "com-\nmon". This option rejoins them into "common". It only acts when a lowercase letter follows the break, so genuine hyphenated compounds like "well-known" are left alone.
Will it damage my paragraph structure?
Not with unwrapping selected. Blank lines are treated as real paragraph boundaries and preserved. Text that uses single line breaks between paragraphs, with no blank line, cannot be distinguished from a hard-wrapped paragraph by any tool, so those will be joined.
Does it handle Windows and Mac line endings?
Yes. Carriage returns are normalised first, so text from any platform behaves the same. That alone fixes a lot of pasted text that looks doubly spaced for no obvious reason.
Is there a size limit?
None imposed. Very large documents may make typing feel slow because the text is reprocessed on every keystroke; pasting rather than typing avoids that.
Is my text uploaded?
No. Everything runs in your browser and nothing is stored. That matters when the text is a contract, a manuscript or anything else you would not paste into a random website.