Line Break Remover

How to use 3 steps
  1. Paste your Text.
  2. Pick the Mode and what to Join lines with.
  3. Press Process, then Copy.
Result

Unwrapping keeps a blank line as a real paragraph break, which is what you want when text has been copied out of a PDF or a plain-text email and every line ends short.

How this tool works

Line endings are normalised first, so a file written on Windows and one written on macOS behave identically. After that the mode decides the shape of the result: joining everything into a single block, collapsing only the runs of blank lines, or joining within each paragraph while keeping the blank lines that separate them. Paragraph mode is the one that matches how text usually breaks when it is copied out of a PDF or a hard-wrapped email.

The joiner is what gets inserted where a break used to be — a space in nearly every case, a comma and space for turning a list into a comma-separated line, or nothing at all when the break was splitting something that should never have been split. Trimming each line first removes the leading and trailing spaces that hard-wrapped text usually carries. The count reported is the net number of line breaks that disappeared.

Choosing the right mode

  • Paragraph mode is the safe default for pasted text: lines within a paragraph are joined, and the blank lines between paragraphs are kept, so the structure of the document survives.
  • Joining everything is for a single field: spreadsheet cells, a meta description, a search box. It produces one line however long the input was.
  • Collapsing extra breaks touches nothing else: runs of three or more newlines become one blank line. Words, spacing and paragraph breaks are untouched, which makes it the least destructive option.
  • An empty joiner runs words together: it is right for a broken URL or a split code identifier and wrong for prose, where the line break was doing the work of a space.

The problem this solves

Text copied out of a PDF, an email client or a terminal arrives with a line break at the end of every visual line rather than every paragraph. Paste it into a document and it stays broken at the width of the original, ignoring the width it is now in.

Removing those breaks lets the text reflow properly. The [msm_tool slug="remove-line-breaks"] does that, and it offers a paragraph mode because the naive version destroys something you usually want to keep.

Paragraph mode is the one to use

Stripping every line break turns an entire document into one continuous block. Technically correct, and rarely what anyone meant.

Paragraph mode treats a blank line as a paragraph boundary: breaks within a paragraph are removed so the text reflows, and the blank lines between paragraphs survive. That is almost always the right behaviour for prose from a PDF.

Use the plain mode when you genuinely want one line — preparing a value for a single-line field, or flattening text for a CSV cell.

Watch the joins

Two things to check in the result, because both look fine at a glance:

  1. Missing spaces. If the source had no trailing space before each break, joining two lines gives theend rather than the end. Scan for run-together words, particularly at the start of the document where you stop reading carefully.
  2. Hyphenated words. PDFs and typeset documents break words across lines with a hyphen. Removing the break leaves hyphen- ated or hyphen-ated in the middle of a sentence. There is no reliable way to detect this automatically — a genuine hyphen and a line-break hyphen look identical — so it needs a read-through.

What else comes out of a PDF

Line breaks are usually not the only problem. Text extracted from a PDF commonly carries:

  • Page headers and footers interleaved through the body, appearing every forty lines or so.
  • Page numbers on their own lines.
  • Non-breaking spaces and unusual space characters that look normal and break searches.
  • Curly quotes and en dashes, which is fine unless something downstream expects plain ASCII.
  • Text in the wrong order if the original had columns — the extraction reads across the page rather than down each column.

That last one is not fixable by removing line breaks and is worth checking before you spend time on the rest.

Windows line endings

Windows ends a line with a carriage return and a line feed. Text that has travelled between operating systems may carry both, one, or a mixture.

Removing only one of the pair leaves a stray character that displays as nothing in some places and as a visible artefact in others. If cleaned text still shows odd breaks or invisible characters, mixed line endings are the usual explanation.

Where line breaks are meaningful

Do not run this on:

  • Poetry or lyrics, where the line shape is the work.
  • Addresses, where each line is a field.
  • Code in any language, and especially Python and YAML.
  • Markdown, where a blank line separates paragraphs and two trailing spaces force a break.
  • Anything column-aligned, where position is the delimiter.

Keep the original

The joins are not reversible — once two lines are one, nothing knows where the break was. Work from a copy, particularly on a long document where a run-together word two thirds of the way down will not be spotted until someone else reads it.

Frequently Asked Questions

Specific to the Line Break Remover. Broader questions about this category are answered on the category page.

Paragraph mode with a space joiner. It repairs the hard-wrapped lines within each paragraph and leaves the paragraph breaks in place.
The joiner was set to nothing, so the break was removed without anything replacing it. Choose a space instead.
The difference between the number of line breaks going in and coming out — not the number of characters, and not the number of paragraphs affected.
Only if you ask it to trim, which removes leading and trailing spaces from each line before joining. Spacing inside a line is left alone.
Yes. Carriage returns are normalised before anything else runs, so mixed line endings give the same result as consistent ones.

Subscribe to receive notifications about new tools, features, and productivity tips.