Remove Line Breaks
Collapse hard wraps back into flowing paragraphs, without losing the breaks that matter.
What this tool does
Remove Line Breaks offers three separate operations rather than one blunt strip. Unwrap paragraphs joins the lines inside each paragraph and keeps the blank line between paragraphs. Everything onto one line collapses the whole document into a single run. Blank lines only does the reverse of the other two — it deletes empty lines and leaves every other break untouched.
Two settings exist because hard-wrapped text has two predictable kinds of damage. Rejoin words split by a hyphen at line end repairs a word broken across a wrap, so "con-" followed by "tinues" comes back as "continues". Keep list and quote lines separate holds a line on its own when it begins with a bullet, a blockquote marker, a heading hash, a number followed by a full stop or bracket, or a letter whose full stop or bracket is followed by a space — otherwise a numbered list is swallowed into the surrounding prose. You also choose what the joined lines are glued with: a space, nothing, or a comma and a space, which turns a column of values into a comma-separated list.
Where it will get things wrong is worth knowing in advance. Unwrapping treats a blank line as the only signal that a paragraph has ended, so text that separates paragraphs by indentation alone — as many PDFs do — comes out as one long block. The dehyphenation rule cannot tell a wrap from a genuine compound, so "well-" at the end of a line joins into "wellknown"; it also only fires when the letters on both sides of the break are lowercase, so a capitalised split arrives as "Sub- Section", hyphen and space intact. Every line is trimmed before it is joined, meaning leading indentation is discarded and nested list items come back flush left. That makes the two joining modes wrong for source code; use Remove Extra Spaces for whitespace tidying that leaves the line structure alone.
The work happens in this browser tab using the page's own JavaScript. The text you paste is not uploaded, which matters here because the input is usually something extracted from elsewhere: a contract, a manuscript, a run of email addresses, the body of a report someone sent you.
How to use it
- Paste the hard-wrapped text. Drop it into the input box, or press Load sample for a short example that shows a wrapped paragraph and a bullet list together.
- Pick what to remove. Unwrap paragraphs for text out of a PDF or a plain-text email. Everything onto one line when the result has to be a single string. Blank lines only when the wrapping is fine and the gaps are not.
- Set the joiner and the two repairs. Choose a space, nothing, or a comma and a space. Which controls appear follows the mode: the joiner and hyphen rejoining for both unwrapping modes, list protection only for Unwrap paragraphs, none of the three for Blank lines only. Leave the repairs on unless your text has compounds broken across lines or bullet characters used as ordinary punctuation.
- Run it and copy the output. The reflowed text appears in the right-hand pane and the summary line says how many line breaks were removed. The Copy output button beneath that pane sends the result to the clipboard.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Text copied out of a PDF
Column layout ends every line where the column ended, not where the sentence did. Unwrapping restores the sentences before you paste them anywhere else.
A plain-text email quoted back at you
Mail clients wrap at 72 or 78 characters and the wraps survive the copy. Unwrapping with list protection on keeps the quoted lines marked with > intact.
Turning a column into a list
A vertical column of names, SKUs or email addresses becomes a comma-separated line with Everything onto one line and the comma joiner.
Fitting text into a single field
Form fields, CSV cells, JSON string values and spreadsheet imports break on an embedded newline. Collapsing to one line removes the thing that breaks them.
Tightening spaced-out prose
A document with a blank line between every paragraph, or double-spaced throughout, closes up with Blank lines only and nothing else changes.
Questions
Is the text you paste uploaded anywhere?
Why did it join two paragraphs together?
Why did a hyphenated word lose its hyphen?
Are my bullet points safe?
Does the blank-lines-only mode use the other settings?
What happens to indentation and multiple blank lines?
Related tools
- Word Counter — Count words, characters, sentences and reading time.
- Case Converter — Switch between upper, lower, title, camel and snake case.
- Remove Extra Spaces — Normalise double spaces and stray whitespace.
- Sort Lines — Sort lines alphabetically, numerically or randomly.
- Remove Duplicate Lines — Delete repeated lines from a list.
- Find and Replace — Bulk replace text with optional regular expressions.