Remove Line Breaks

Strip line breaks and newlines from text, with the option to keep paragraph breaks intact.

Options

Input: 0 lines → Output: 0 lines · 0 characters

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

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.

Windows (CRLF), Unix (LF) and old Mac (CR) line endings are all handled, and whitespace-only lines are dropped so you never end up with double spaces. 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 — 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.

Report a bug