Remove Line Breaks
Strip line breaks out of pasted text — join it all onto one line, unwrap paragraphs copied out of a PDF, or remove blank lines only.
Runs 100% in your browser•Nothing is uploaded to a server•Instant results
Options
Input
Before and after
About removing line breaks
Paste text and this tool removes the line breaks as you type. Which breaks it removes is the whole question, so it is the first control on the page. Every line break joins the lot onto a single line — the right answer for a paragraph that has to go into a spreadsheet cell, a CSV field, a form input or a chat message. Unwrap paragraphs joins the wrapped lines inside each paragraph but keeps the blank line between paragraphs, which is what you almost always want after copying text out of a PDF, an email or a plain-text file that was hard-wrapped at 72 columns. Blank lines only leaves every real break alone and just closes up the gaps, for a list that has grown double-spaced.
Each removed break is replaced with a space, a comma and a space, or nothing at all. A comma turns a column of values into a comma-separated list in one step, and the tool will not stack a second comma onto a line that already ends in one. Replacing with nothing is left completely literal, so a hash, a licence key or a base64 blob that got wrapped by an email client comes back as the exact original string rather than one with helpful spaces added.
Three cleanup passes run alongside: trim each line drops the leading and trailing whitespace that makes a join produce double spaces, collapse repeated spaces squeezes runs of spaces down to one, and tabs to spaces converts tab characters that would otherwise survive the join invisibly. Windows line endings (\r\n) and the lone carriage returns still found in older files are normalised first, so no invisible \r is left behind in the result — the usual reason text that "looks joined" still breaks when it is pasted somewhere else.
The counters underneath show the character count before, the character count after, the difference and how many breaks went away, all updating live. Everything runs in your browser: nothing you paste is uploaded, which matters when the thing you are unwrapping is a contract, a transcript or an API key.