TanodTools

Remove line breaks

Join broken lines back into flowing text, keeping paragraphs if you want them. Handy for text copied out of PDFs and emails.

Runs entirely in your browser

Line breaks

Paste text to begin.

Text up to about 5 MB. The result updates as you type; very long text updates a moment after you stop typing.

How to remove line breaks

  1. Paste your text into the box, or open a .txt file.
  2. Choose Keep paragraphs to join only the lines inside each paragraph, or Remove all to make one long line. Pick what to put between joined lines.
  3. Copy the result or download it as a .txt file.

Turning broken lines back into paragraphs

Text copied from PDFs, old emails, terminal windows and some websites often has a hard line break at the end of every visual line. Pasted into a document or a form, it stays broken into short lines that don't reflow. This tool removes those breaks and joins the pieces with a space, so the text flows again.

Keep paragraphs is the right choice for most prose: it keeps the blank lines that separate paragraphs and joins everything else. Remove all puts the whole text on one line, which suits short snippets, list items you want comma-separated, or values going into a single spreadsheet cell.

PDF text sometimes splits words across lines with a hyphen. Turn on Join words split by a hyphen to put them back together, and check the result for real hyphenated words.

Tips

Questions

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

A PDF stores where each line sits on the page, not which lines belong to the same paragraph. When you copy text out, most viewers end every line with a line break, so a paragraph arrives as a stack of short lines. Joining the lines inside each paragraph restores normal flowing text.

How does Keep paragraphs know where a paragraph ends?

A blank line (a line that is empty or holds only spaces) marks the end of a paragraph. Lines with text between blank lines are joined into one paragraph, and the result has exactly one blank line between paragraphs. If your text has no blank lines at all, Keep paragraphs gives the same result as Remove all.

What does Join words split by a hyphen do?

When a line ends in a hyphen and the next line starts with a lower-case letter, as in "infor-" and "mation", the two parts are joined without the hyphen. A genuine hyphenated word that happens to break at its hyphen, such as "well-" "known", will lose its hyphen too, so this option is off until you turn it on.

Can I join lines with a comma instead of a space?

Yes. Choose Custom and type what should go between joined lines, such as a comma and a space to turn a list into one line. Nothing, a space and a custom separator are offered.

Are Windows line breaks handled?

Yes. Windows (CR LF), old Mac (CR) and Unix (LF) line breaks are all recognised. The result uses plain LF line breaks between paragraphs.

Is my text uploaded?

No. The text is processed in your browser, and it is not uploaded or stored.