Remove Line Breaks

Remove line breaks from text

Strip line breaks out of pasted text — great for cleaning up copied PDFs, emails, and code comments.

▌ Input
▌ Output

How it works

Paste text on the left and the cleaned version appears on the right. Choose whether to join lines with a space, remove blank lines, and collapse repeated spaces. Then copy the result.

This pairs well with the other text tools: tidy capitalization with the case converters, flip text with the reverse text tool, or sort and dedupe a list with alphabetize. For everything in one place, use the text transformer.

When you need it

Text copied out of PDFs, emails, code comments and chat logs often arrives with a hard line break at the end of every line, which becomes a mess when you paste it into a document, a spreadsheet cell, or a form field that expects one continuous paragraph. Stripping those breaks — while keeping the real paragraph breaks — turns broken-up text back into clean, flowing prose.

The options, explained

Join with a space replaces each break with a space so words don't run together; remove blank lines collapses the empty gaps left behind; and collapse repeated spaces tidies the double spaces copying often introduces. Combine them to go from a jagged paste to a single clean block in one step, all in your browser.

FAQ

Why does copied PDF text have weird line breaks?
PDFs store hard line breaks at the end of every visual line. This tool removes them so the text flows as continuous paragraphs.
Can I keep paragraph breaks?
Yes — leave 'Remove blank lines' unchecked and only the within-paragraph breaks are joined.

Related tools