Remove Line Breaks

Joins lines together by replacing line breaks with a space or nothing, optionally keeping the gaps between paragraphs. It is useful for fixing text copied from PDFs or emails, where every line ends with an unwanted break.

Up to 1 MiB.

Options

How to use the Remove Line Breaks

  1. Paste text with unwanted line breaks, for example copied from a PDF or an email.
  2. Choose to replace each line break with a space or nothing (for languages written without spaces, such as Chinese or Japanese).
  3. Keep Keep paragraph breaks on to join lines inside paragraphs but keep the empty lines between them.

Rules applied

  • Spaces around a line break are removed so words are not separated by double spaces.
  • To join a list with a custom separator such as a comma, use Join Lines (coming soon).

Limitations

  • Words hyphenated across lines (exam-\nple) keep their hyphen.

Worked examples

Text copied from a PDF

Input

This sentence was
broken across
several lines.

A new paragraph
starts here.

Result

This sentence was broken across several lines.

A new paragraph starts here.
Join everything into one line

Input

one
two

three

Result

one two three

Practical uses

  • Fixing text copied from a PDF

    A student copies a paragraph from a PDF where every line ends with a break, so quoting it looks untidy. They paste it into the tool and choose to replace each line break with a space. The lines join into a normal paragraph that is ready to quote.

  • Preparing text for a form

    A clerk needs an address block on a single line to fit a form field. They paste the address and replace each line break with a space. The tool also removes spaces around the breaks, so there are no double spaces.

  • Reflowing an email

    An assistant has a hard-wrapped email where every line is cut short. They paste it in and keep Keep paragraph breaks on. Each paragraph is joined into one line, and the blank lines between paragraphs stay in place.

Privacy: this tool runs entirely in your browser. Your text is not uploaded, logged or saved, and it is never sent to analytics. Maximum input: 1 MiB.