Why pasted text ends up with broken lines
You copy a paragraph out of a PDF or an email, paste it somewhere else, and instead of one flowing paragraph you get a ragged column of short lines, each one ending a few words early. This isn't damage and it isn't random — it's a side effect of how the source document was built. A PDF doesn't actually store paragraphs; it stores individual lines positioned at exact coordinates on a page, wrapped to fit the page width the author chose. When you select and copy text, most PDF viewers hand over a line break at the end of every visual line, not just at the end of every paragraph, because as far as the file format is concerned there's no difference between the two. Emails forwarded through older clients do something similar, inserting a hard line break every 70 or so characters so the message displays cleanly in a plain-text reader. The result is text that looks fine in its original context but turns into a mess the moment you need to remove line breaks from text and reuse it in a document, a script, or a search box that treats each short line as a separate unit.
Two modes: join everything vs. keep paragraphs
This tool offers two ways to clean that up, and the difference matters depending on what
you're pasting. Keep paragraph breaks, the default, treats any blank line —
two or more line breaks in a row — as a real paragraph boundary and leaves it alone. Inside
each paragraph, it joins every line with a single space, collapses runs of multiple spaces
throughout the text, and normalizes Windows-style \r\n endings to plain
\n first so nothing is missed. A paragraph that was accidentally left empty is
dropped rather than turned into a stray blank line in your output. Remove all line
breaks is blunter: every line in the whole input, paragraph breaks included, gets
joined into one continuous line of text. That's the mode to reach for when you need a single
unbroken string — a CSV cell, a URL slug, a one-line search query — and don't care about
preserving paragraph structure at all. Both modes are one click away as radio buttons above
the text boxes, so you can flip between them and watch the output change instantly without
re-pasting anything.
How to use it
Paste your text into the box on the left. The box on the right updates immediately, with no button to click and no page to reload. Pick whichever mode fits what you're doing — keep paragraph breaks is selected by default since it's the safer choice for most writing — and if you switch modes partway through, the output recalculates right away using whatever text is currently in the input box. When the result looks right, click Copy to grab it in one step, or Clear to wipe the input and start over with a fresh paste. Everything runs locally in your browser using plain JavaScript; nothing you type or paste is ever uploaded, logged, or sent to a server, which makes this a reasonable way to delete line breaks online even from text you'd rather not put through a random web service.
Fixing PDF copy-paste text
PDF line breaks are the single most common reason people land on a tool like this. Academic papers, scanned reports, contracts, and anything exported from a page-layout program all share the same habit of hard-wrapping every line, so a paragraph that reads as five lines on the page becomes five separate lines the instant you paste it into a text editor or a document. If you're trying to fix pdf line breaks so a passage reads as normal prose again, start with keep paragraph breaks: as long as the source had actual blank lines or extra spacing between paragraphs, this mode rebuilds clean paragraphs while collapsing every mid-paragraph break into a plain space. If the PDF's paragraphs weren't separated by a blank line at all — which happens with some exports — you'll end up with one long paragraph, and switching to remove all line breaks gives you the same flattened result on purpose, ready for you to re-add paragraph breaks manually wherever they belong.