Skip to content

Remove line breaks

Paste text from a PDF or an email and get lines that flow again. Replace each break with a space, a comma or your own text.

Nothing is uploaded. The text is joined on your device.

How it works

  1. Paste your text. Put the text in the top box. The lines are joined in the box below straight away.
  2. Choose what replaces each break. A space for running text, a comma to turn a list into one line, nothing to glue lines together, or your own text. Keep paragraphs if the blank lines between them matter.
  3. Copy the result. Press Copy to put the joined text on your clipboard.

Why copied text breaks in the wrong places

A PDF stores each printed line as its own line of text. When you copy a paragraph out of one, every line ending comes with it, so the paragraph pastes as a narrow column that stops short of the edge. Plain-text emails do the same thing: many mail programs wrap lines at about 72 characters and send the breaks along with the words. Subtitles, terminal output and text scanned with OCR have the same problem.

Removing those breaks gives you sentences that flow again, so the text fits a web form, a document or a chat message.

Choosing the options

  • Space is right for prose. Each break becomes one space, so the last word of a line does not run into the first word of the next.
  • Comma turns a column of items, such as email addresses or product codes, into one line: red, green, blue. Empty lines are skipped, so you never get two commas in a row.
  • Nothing glues lines together with no gap. Use it for a long link, a key or a number that was wrapped across lines.
  • Custom puts any text you type between the lines, such as a semicolon or a pipe.
  • Keep paragraphs treats a blank line as the end of a paragraph. Lines inside a paragraph are joined, and one blank line stays between paragraphs.
  • Tidy spaces trims the spaces at the start and end of every line and turns runs of spaces or tabs into one, so the joined text has no double gaps.

What it does not change

Only line breaks and, with Tidy spaces, extra spaces are touched. Words, punctuation and letter case stay as they are. A word that was split with a hyphen at the end of a line, such as exam- then ple, keeps its hyphen, because a hyphen can also be part of the word; check those by eye.

The text is processed in your browser with plain JavaScript. It is never uploaded, logged or stored.

Related tools

Common questions

How do I remove line breaks from text?
Paste the text into the top box. The lines are joined with a space in the box below as you paste, ready to copy.
How do I remove line breaks but keep paragraphs?
Choose Keep paragraphs. Lines inside each paragraph are joined, and the blank line between paragraphs stays.
Why does text copied from a PDF have line breaks?
A PDF stores each printed line separately, so copying a paragraph brings every line ending with it. Removing the breaks makes the sentences flow again.
Can I replace line breaks with commas?
Yes. Choose Comma and a column of items becomes one line separated by commas. Empty lines are skipped.
Can I replace line breaks with something else?
Choose Custom and type the text you want between the lines, such as a semicolon, a pipe or a word.
Does it remove double spaces too?
With Tidy spaces on, which is the default, each line is trimmed and runs of spaces or tabs become one space. Choose Leave as is to keep spacing exactly as it was.
Does it handle Windows line endings?
Yes. Windows, Mac and Linux line endings are all treated as one line break each.
Is my text uploaded?
No. Everything happens in your browser and the text never leaves your device.
Is it free?
Yes. There is no account, no limit and no sign-up.