Skip to content
DeviceCheckHub

Remove Line Breaks

This line break remover turns text copied from a PDF, email or web page back into clean paragraphs while you type: lines joined, split words rejoined, extra spaces tidied and lists kept in place.

Paste text with unwanted line breaks, such as text copied from a PDF or an email. It is fixed while you type.

How to remove line breaks

  1. Paste your text into the box on the left, or press Open a file to load a .txt file. The example shows the usual problem: a line break at the end of every line and a word cut in two with a hyphen.
  2. The fixed text appears on the right while you type. By default the lines inside each paragraph are joined with a space and the paragraphs stay apart, because a blank line marks where one paragraph ends.
  3. To make the whole text a single line, choose All line breaks (one line) under Remove.
  4. To put something other than a space where each line break was, choose it under Replace each line break with: nothing, a comma, an HTML <br> tag or your own text.
  5. Press Copy and paste the result where you need it, or Download .txt to keep it as a file.

Why copied text is full of line breaks

PDFs. Most PDFs are built to look the same on every screen and printer, so each line of text is stored at its place on the page, not as flowing paragraphs. When you copy from a PDF, the end of every line comes along as a line break, and a word that the program split to fit the line arrives as two halves with a hyphen. Pasted into an email or a document, the text then breaks in odd places as soon as the width changes.

Emails. The email standard asks for lines of no more than 78 characters, so many mail programs wrap plain-text messages at about that width when they send or quote them. Copying such an email gives you short lines with a break at each end.

Web pages, code and terminals. Text copied from a fixed-width source, such as a terminal window, a code comment or a text file wrapped by hand, keeps the line breaks the writer typed.

The kinds of line break

A line break is not a visible character, but it is stored in the text like any letter. Computers have used three ways to mark one, a leftover from typewriters, where the carriage return moved the paper back to the left edge and the line feed rolled it up one line:

This tool understands all three, as well as the rarer Unicode line separator and paragraph separator characters, so text from any computer is handled the same way. The result uses line feeds, which every modern program reads.

What each option does

Removing line breaks in Word, Excel and other programs

When removing line breaks helps

To delete repeated lines rather than line breaks, use remove duplicate lines. To change capital letters, try the case converter, and to sort the lines, alphabetical order.

Tips

Your text stays on your device

The line breaks are removed in your browser, and your text is never uploaded to this website or anyone else, so it is safe to use with private emails and documents. Only your settings are remembered on this device; the text is gone when you close the page.

Frequently asked questions

How do I remove line breaks from text?

Paste the text into the box and the result without line breaks appears next to it straight away. Press Copy to paste it anywhere, or Download .txt to save it. Choose “Remove all line breaks” to make the whole text one line.

How do I keep paragraphs but remove the other line breaks?

That is what the default setting does. A blank line marks the end of a paragraph, so the lines inside each paragraph are joined and the paragraphs stay apart. Choose “One line break” under “Between paragraphs” if you want them without an empty line between them.

Why does text copied from a PDF have line breaks everywhere?

Most PDFs store each line of text in its place on the page, without a record of where sentences and paragraphs flow. When you copy, every line ending becomes a line break. This tool joins those lines back into paragraphs.

What happens to words split with a hyphen at the end of a line?

With “Join words split by a hyphen” ticked, a line ending in a letter and a hyphen is joined to a next line that starts with a small letter, so “exam-” and “ple” become “example”. Words that really contain a hyphen at that point, such as “well-known”, lose it too, so untick the box for text full of those.

Can I replace line breaks with commas or something else?

Yes. Under “Replace each line break with”, choose a space, nothing, a comma and space, an HTML <br> tag, or your own text. Choosing a comma turns a column of names into a single comma-separated line.

Is my text uploaded?

No. The text is changed in your browser and is never sent to this website or anyone else. Only your settings are saved on this device; the text itself is not kept.

Last updated · About DeviceCheckHub