Remove line breaks

Text copied from a PDF or an email often breaks in the middle of sentences. Join the lines back into proper paragraphs, or add line breaks where you need them.

What to do

This free online line break remover works in your browser. Everything runs in your browser. What you type is not sent anywhere. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy. There is no fixed file size limit: files are processed on your device, so very large ones depend on its memory and work best on a computer.

Why copied text breaks

PDFs store text as positioned lines, not flowing paragraphs, so copying gives you a hard line break at the end of every printed line. Plain-text emails are often wrapped at 72 or 76 characters for the same reason. Joining the lines with spaces restores the original paragraphs, and keeping blank lines preserves the paragraph breaks.

Good to know

  • Words split with a hyphen at the end of a line, such as “informa-” and “tion”, are joined with a space. Use find and replace with the regex -\s+ to rejoin them.
  • Wrapping never splits a word. A single word longer than the width stays on its own line.
  • Windows, Mac and Linux line endings are all understood.

Worked example: Fixing hard-wrapped lines copied from a two-column PDF paper

When you copy two paragraphs out of a PDF viewer, the PDF stores fixed visual lines rather than flowing paragraphs, leaving a hard newline (\n) after every 50–60 characters:

The browser decodes each frame in local memory
without sending packets over the network.

Large 4K recordings work best on a desktop
computer with at least 8 GB of RAM.

With Keep paragraph breaks (blank lines) selected, single line breaks inside each paragraph are replaced with a single space, while the double newline (\n\n) between the two paragraphs is preserved:

The browser decodes each frame in local memory without sending packets over the network.

Large 4K recordings work best on a desktop computer with at least 8 GB of RAM.

Limits and what this tool cannot do

  • PDFs that have no blank line between paragraphs: Some academic PDFs separate paragraphs using first-line indentation instead of an empty vertical line (\n\n). Because every line break in the copied text is a single \n, Keep paragraph breaks will join all paragraphs into one block unless you insert blank lines between paragraphs first.
  • Hyphenated line-end words (trans-\nformation): Joining lines with a space turns a PDF line-end hyphen trans-\nformation into trans- formation; check for hyphen-space sequences after joining.
  • Tables and code blocks: Do not run Remove Line Breaks on source code, poetry, or tabular columns where every line break is intentional.

Questions

How do I remove line breaks but keep paragraphs?

Leave Keep paragraphs on. Single line breaks are joined; blank lines between paragraphs stay.

Can I put each sentence on its own line?

Yes. Choose One sentence per line. It is useful for subtitles and translation work.

Is my text uploaded?

No. Everything runs in your browser. What you type is not sent anywhere.

What is the difference between 'Keep paragraph breaks' and 'Remove all line breaks'?

'Keep paragraph breaks' preserves double newlines (blank lines between paragraphs) while joining wrapped lines inside each paragraph. 'Remove all line breaks' collapses the entire input into one continuous single-line string.

Can I replace line breaks with commas to make a comma-separated list?

Yes. Choose the custom separator option (or comma separator) to turn a column of IDs or emails into id1, id2, id3.

Does this tool also collapse double or triple spaces left when lines are joined?

Yes. Trailing spaces at the end of a wrapped PDF line are collapsed so joining two lines produces a single clean space between words.

Last reviewed .

Related converters and guides