Remove Line Breaks — Fix Text Pasted From PDFs and Emails

Join broken lines into flowing paragraphs, or strip every line break, and tidy the extra spaces while you are at it.

🔒 Runs in your browser — files never uploaded ⚡ No signup 💯 Free

Remove unwanted line breaks from text copied out of a PDF, an email, a scanned document or a terminal — where every line ends in a hard return and pasting it anywhere else makes the lines break in the wrong places. The default mode joins lines back into paragraphs while keeping the blank lines that separate them; another strips every break into one block; a third leaves the breaks alone and only cleans up double spaces and trailing whitespace.

How to use Remove Line Breaks

  1. Paste the text.
  2. Choose a mode. "Keep paragraphs" is right for prose; "remove all" for a single-line string; "only tidy spaces" when the line breaks are wanted.
  3. Copy the result. The counters show how many lines and characters were removed.

Where the breaks come from

PDFs, emails older than about 2005, plain-text files wrapped at 72 characters, and code editors all store text with a line break at the end of each visual line rather than each paragraph. Word processors and web pages do the opposite: one paragraph is one line, wrapped on the fly to fit the window. Copy from the first kind into the second and you get ragged, stair-stepped text. The fix is mechanical — join the lines — as long as the paragraph boundaries survive, which is what "keep paragraphs" mode preserves: any blank line still separates paragraphs.

The details that matter

  • Hyphenated line endings are re-joined: "sepa-" at the end of one line and "rated" at the start of the next become "separated". Only a lowercase letter on both sides triggers it, so "well-" before a capital is left alone.
  • Double spaces left behind by justification are collapsed to one.
  • Trailing spaces at the ends of lines are trimmed.
  • Empty lines can be removed as a separate option — useful for lists that came out double-spaced.

When to keep the breaks

Poetry, addresses, code, tables and lists are meant to have line breaks. Use "only tidy spaces" mode for those, and for finding and changing specific breaks, the find & replace tool understands regular expressions. To de-duplicate or sort the lines instead, see remove duplicate lines and sort lines.

Frequently asked questions

Which mode do I want?

For prose from a PDF or email: "keep paragraphs". For a single-line value (a URL, a key, a one-line description): "remove all". For poetry, addresses, code or lists: "only tidy spaces", which leaves every line break in place.

How does it know where a paragraph ends?

A blank line. Lines separated only by a single line break are joined; a gap of one or more empty lines is kept as a paragraph break. If your source had no blank lines at all, use "remove all" and add breaks by hand.

What does the hyphen option do?

Re-joins words that were split at a line end with a hyphen ("sepa-" / "rated" → "separated"). It triggers only for a lowercase letter on both sides, so real hyphens before a capital or a number are left alone. Untick it for text with many genuine hyphens.

Does it change my words?

No — only whitespace: line breaks, runs of spaces and tabs, and trailing spaces. Punctuation, capitalisation and spelling are untouched.

Can I remove line breaks in Excel or Word instead?

Excel: =CLEAN(A1) removes breaks inside a cell. Word: find ^p and replace with a space — but that also joins paragraphs. This tool keeps the paragraphs, which is usually the harder part.