Remove line breaks

Text copied from a PDF, an email or a narrow column often breaks in the middle of sentences. Paste it here to join the lines back into normal paragraphs.

Replace a line break with

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Paste the text into the left box. The joined text appears on the right at once.
  2. Choose what replaces a line break: a space (for normal text) or nothing (for words and links cut across lines).
  3. Keep or drop paragraph breaks, then press Copy.

How it works

With “Keep paragraph breaks” on, the text is first split into paragraphs at blank lines; a line holding only spaces counts as blank. Inside each paragraph every line break is replaced with the chosen separator. Paragraphs are joined back with one blank line between them, and empty ones are dropped. With the option off, the whole text becomes one line.

“Remove extra spaces” then collapses every run of spaces, tabs and other whitespace to one space and trims each paragraph, which also removes the indents that PDFs often add.

Worked example

The text “Hello⏎world.⏎⏎New⏎paragraph.” with the default settings becomes two paragraphs: “Hello world.” and “New paragraph.”. With “Keep paragraph breaks” off it becomes one line, “Hello world. New paragraph.”.

Tips

Text from a PDF often ends lines with a hyphen at a word break (“infor-” / “mation”). This tool does not remove hyphens, because many are real (“well-known”); after joining, use find and replace to change “- “ into nothing where needed.

Frequently asked questions

How do I keep paragraphs but remove line breaks inside them?

Leave "Keep paragraph breaks" on. Lines are joined inside each paragraph, and every blank line, or several in a row, becomes one paragraph break.

When should a line break be replaced with nothing?

When a word or a link was cut across lines, such as "exam-" / "ple.com" without the hyphen, or for Chinese and Japanese text, which has no spaces between words. For ordinary text use a space, or the words at the joins will stick together.

What does "Remove extra spaces" do?

It turns any run of spaces and tabs into one space and trims spaces at the start and end of each paragraph. Turn it off if the spacing inside lines matters.

Does it handle Windows line breaks?

Yes. Windows (CR + LF), old Mac (CR) and Unix (LF) line breaks are all treated the same.

More in Text

All tools in this category: Text ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.