Line Break Remover

Remove line breaks from text copied from PDFs and emails

Join lines of text into flowing paragraphs - ideal for text copied from PDFs, emails or terminals. Optionally keep paragraph breaks, rejoin words hyphenated across lines, and choose what replaces each break.
Try an example:

Output will appear here...

About Line Break Remover

How it works

  1. Every line is trimmed and joined to the next with a space (or nothing, or your own text).
  2. Words broken across lines with a hyphen - common in PDFs - are joined back together when the next line continues in lowercase.
  3. With "Keep paragraph breaks", blank lines stay so each paragraph remains separate.

What you need

  • Text with unwanted line breaks, such as a paragraph copied from a PDF.

Tips

  • Keep paragraph breaks for multi-paragraph documents; untick it to get one long line.
  • Use a custom replacement like ", " to turn a column of values into a single line.
  • Hyphenated compound words that end a line (e.g. "well-\nknown") will be joined as "wellknown" - review the result.

Limitations

  • Text that relies on line breaks for layout (poems, addresses, code) will lose that layout.

Runs in your browser. Your text never leaves your browser.

Frequently asked questions

Why does text from a PDF have line breaks everywhere?+

PDFs store text line by line as it is laid out on the page, so copying keeps a break at the end of every line. This tool joins them back into paragraphs.

How do I keep paragraphs?+

Tick "Keep paragraph breaks". Lines inside a paragraph are joined, while blank lines between paragraphs are kept.

What does rejoining hyphenated words do?+

PDFs often split long words across lines with a hyphen ("exam-" + "ple"). When the next line starts in lowercase, the hyphen and break are removed to restore "example".

Does it remove spaces too?+

Spaces at the start and end of lines are trimmed; spaces inside lines are kept. Use the Text Cleaner to collapse repeated spaces.