Remove Line Breaks

Collapse hard wraps back into flowing paragraphs, without losing the breaks that matter.

Runs on your deviceTextWorkingNo account needed

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

  1. 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.
  2. 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.
  3. 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.
  4. 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?
No. The whole operation runs in this browser tab, so nothing is transmitted or stored and the tool keeps reflowing text after the network is disconnected. That is worth having when the text came out of a document you would not email to a stranger.
Why did it join two paragraphs together?
Unwrapping uses a blank line as the paragraph boundary. If your source separates paragraphs with an indent or a single break instead, there is nothing to detect and the lines merge. Insert a blank line where each paragraph should end, then run it again.
Why did a hyphenated word lose its hyphen?
The rejoin rule assumes a lowercase word broken at a line end should be repaired, and it cannot distinguish that from a real compound that happens to wrap after its hyphen. Turn the setting off when your text is full of hyphenated terms, and fix the handful of split words by hand.
Are my bullet points safe?
In the unwrap mode they are held on their own line when the line starts with -, *, +, a bullet character, >, # or a number followed by a full stop or bracket. A single letter marker counts too, but only with a space after it: "a) first" is protected where "a)first" is not. Any other marker goes unrecognised, and Everything onto one line has no list protection at all — it folds the items into the surrounding prose by design.
Does the blank-lines-only mode use the other settings?
No. The joiner and the hyphen repair apply to the two unwrapping modes; deleting blank lines does nothing except drop empty and whitespace-only lines, keeping every remaining break exactly where it was.
What happens to indentation and multiple blank lines?
It depends on the mode. The two joining modes trim each line first, so leading spaces and tabs go, and a run of several blank lines between paragraphs comes back as one. Blank lines only leaves indentation and trailing spaces exactly as they were and deletes every empty line rather than reducing a run to one. Windows line endings become plain newlines in all three.

Related tools