Remove Line Breaks and Extra Spaces

Fix text that pasted out of a PDF or email with the line breaks in all the wrong places.

What to clean
Replace removed breaks with
Lines before
0
Lines after
0
Words before
0
Words after
0
Characters removed
0

Free forever, no sign-up and no limits, and this tool installs on its own so you can keep it on your home screen.

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. Paste, fix, copy, done in seconds.

How to use it

  1. Paste your textDrop in whatever you copied. The cleaned version appears immediately below.
  2. Choose what to cleanUnwrapping paragraphs is the usual choice. Tick Remove every line break if you want one continuous line instead.
  3. 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 lines and words before and after, plus how many characters were removed, a quick way to confirm the tool did what you expected before you paste the result somewhere that matters. The word counts should match unless hyphenated words were rejoined, which is itself a useful check.

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.

Questions people ask

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, "infor-" at the end of one line and "mation" at the start of the next. This option, on by default, rejoins them into "information". It only acts when letters sit before the hyphen and the next line starts with a lowercase letter, so a break before a capitalised word, such as a hyphenated name, is left alone. A compound like "well-known" that happens to wrap at its own hyphen cannot be told apart from a split word, so glance over the result when your text is full of compounds.

Can removed breaks become commas instead of spaces?

Yes. The Space, Nothing and Comma chips control what each removed break turns into. Space is right for prose, Nothing for text that was split mid-word, and Comma turns a column of lines into a comma-separated list in one step.

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.

Does it keep bullet points and numbered lists?

Only partly, so check the result. Once formatting has been stripped by the copy, a bullet marker sitting on its own line looks exactly like a wrapped line, and unwrapping can join it to the line above. Lists usually need one manual pass afterwards; ordinary prose does not.