Remove Line Breaks
Strip line breaks and newlines from text, with the option to keep paragraph breaks intact.
Input: 0 lines โ Output: 0 lines ยท 0 characters
How it works
Paste your text and every line break is removed instantly โ no button needed. Choose what each newline becomes: a space (the usual choice for text copied out of a PDF or an email that wrapped mid-sentence), nothing at all, a comma, or any custom separator you type. Leave Keep paragraph breaks on and blank lines survive, so paragraphs stay paragraphs while the hard-wrapped lines inside them are joined into one flowing line. The trim and collapse-spaces options clean up the ragged indentation that usually comes with copied text, and Re-join words split with a hyphen puts words like "informa-" / "tion" back together โ the usual mess when text is copied out of a PDF.
Windows (CRLF), Unix (LF) and old Mac (CR) line endings are all handled, and while Trim each line is on, blank and space-only lines are dropped so you never end up with double separators. Turn it off and every line is kept exactly as it came in. Everything runs as plain JavaScript in your browser: your text is never uploaded to a server, which makes it safe for contracts, logs and anything else confidential. Use Copy result for the clipboard or Download .txt to save the output as a file.
Frequently asked questions
How do I remove line breaks from text?
Paste your text into the box at the top of this page. The line breaks are removed as you type, with no button to press. Pick what each break becomes (a space, nothing, a comma or your own separator), then use Copy result or Download .txt to take the cleaned text with you.
Can I remove line breaks but keep paragraphs?
Yes. Leave the "Keep paragraph breaks" option checked and blank lines are preserved: the hard-wrapped lines inside each paragraph are joined into one flowing line, while the empty line between paragraphs stays. Uncheck it if you want the whole text collapsed into a single line.
Why does text copied from a PDF or email have line breaks in it?
PDFs and plain-text emails store text as fixed-width lines, so a newline is baked in at the end of every visual line rather than at the end of every sentence. Pasting that into a document keeps the ragged wrapping. Replacing each line break with a space rejoins the sentences, and the trim and collapse-spaces options remove the leftover indentation and double spaces.