Free online tool

Remove line breaks from any text

Fix text copied from PDFs, emails and websites: join broken lines back into sentences, keep your paragraphs, or turn a list into one line.

How to remove line breaks

  1. 1Paste the text with unwanted line breaks into the left box.
  2. 2Choose what replaces each line break: a space, nothing, or keep paragraphs.
  3. 3The cleaned text appears on the right as you type.
  4. 4Press Copy result and paste it wherever you need it.

Choosing the right option

  • Replace with spaces joins everything into one block. Best for a single paragraph copied from a PDF or an email.
  • Keep paragraphs joins the lines inside each paragraph but keeps blank lines between them. Best for articles and documents.
  • Remove completely deletes line breaks without adding a space. Use it for text that was split mid-word, such as long links, codes or keys.
  • Comma list turns one item per line into a single comma-separated line, ready for a spreadsheet cell, a tag field or an email.

Where unwanted line breaks come from

Hard line breaks appear when text is copied from a fixed layout: PDFs, scanned documents, plain-text emails that wrap at 72 characters, terminal output and some web pages. They look fine where they came from but break up sentences once pasted into a document, a form or a social media post. Windows, Mac and Linux also store line breaks differently (CRLF, LF and once CR); the tool handles all three.

Frequently asked questions

Why does text from a PDF have line breaks in the middle of sentences? +

PDFs store text line by line as it was laid out on the page, so copying it gives you a hard line break at the end of every visual line. Paste it here with "Replace with spaces" or "Keep paragraphs" and the sentences join back up.

How do I remove line breaks but keep paragraphs? +

Choose "Keep paragraphs". Single line breaks inside a paragraph are replaced with spaces, while blank lines between paragraphs are kept, so the structure of your text survives.

How do I turn a list into a comma-separated line? +

Choose "Comma list". Each line becomes one item, blank lines are dropped and the items are joined with a comma and a space: apples, pears, plums.

How do I remove line breaks in Word? +

Open Find and Replace (Ctrl+H), type ^p in Find what and a space in Replace with, then press Replace All. ^l targets manual line breaks. To keep paragraphs, first replace ^p^p with a placeholder such as ###, then ^p with a space, then ### with ^p^p.

How do I remove line breaks in Excel? +

Select the cells, press Ctrl+H, click into Find what and press Ctrl+J (it inserts an invisible line break), type a space in Replace with and press Replace All. The formula =SUBSTITUTE(A1,CHAR(10)," ") does the same.

Does this also fix double spaces? +

Yes, "Collapse spaces" is on by default and turns runs of spaces left behind by line breaks into a single space. For deeper cleaning, such as tabs, non-breaking spaces and invisible characters, use the remove extra spaces tool.

✓ Copied to clipboard