Remove Line Breaks

Join lines that were broken in the middle of sentences, a common problem with text copied from PDFs and emails. Keep real paragraph breaks and repair hyphenated words if you need to.

Options
Replace each line break with

Processed in your browser. Nothing you type is uploaded.

How it works

Each line break, together with any spaces around it, is replaced with a single space (or nothing). With “Keep paragraph breaks” on, blank lines are recognised as paragraph boundaries and preserved, and only the breaks inside each paragraph are removed.

The optional hyphen repair joins a word split across lines, such as “some-” and “times” becoming “sometimes”. It only applies when a letter, a hyphen and a line break are followed by a lowercase letter.

Rules this tool follows

  • Windows, Unix and old Mac line endings are all handled.
  • Replacing with nothing is useful for strings such as long codes or IDs split across lines.
  • Hyphen repair can join genuine compounds split at a line end (“well-\nknown” becomes “wellknown”); review the result.

Example

Input

Text copied from a PDF often breaks
in the middle of sentences.

A second paragraph also wraps
at a fixed width.

Output

Text copied from a PDF often breaks in the middle of sentences.

A second paragraph also wraps at a fixed width.
With “Keep paragraph breaks” on (the default), the blank line between paragraphs survives.

Common uses

  • Reflowing text copied from PDFs, ebooks or scanned documents.
  • Turning a wrapped email into continuous text.
  • Converting a multi-line value into a single line.

Limitations and notes

  • If the source has no blank lines between paragraphs, the paragraph option cannot tell where they were, and everything becomes one paragraph.
  • Lists and headings are joined into the surrounding text; remove breaks section by section if the text mixes prose and lists.

All text cleaners