Remove Line Breaks From Text

Turn text that is broken across dozens of lines back into one clean paragraph — or keep the lines and just collapse the extra blank ones.

Runs in your browser. Your image is never uploaded.

How to use Remove Line Breaks — Join Text Into One Paragraph

  1. 1Paste your list or text into the left-hand box.
  2. 2Choose what to clean up: line breaks, extra spaces or HTML tags.
  3. 3Copy the result, or download it as a text file.

About Remove Line Breaks

Text arrives broken into short lines more often than it arrives as clean prose. Copying from a PDF gives you a break at the end of every printed line; quoted email replies come back hard-wrapped at around seventy characters; comments pulled out of source code, output from a terminal and text exported from older systems all carry line breaks that were about page width, not about meaning. Paste any of it here and the breaks become spaces again, leaving a paragraph you can drop into a document, a CMS field or a message without a ragged edge every few words.

The separator is what makes this more than a delete key. A single space is right for sentences. Joining with nothing at all is for the case where one long value — a token, a URL, a base64 blob — was wrapped across several lines and needs to be one string again. Comma-and-space or semicolon-and-space flips a vertical list into an inline one, which is the quickest way to turn a column of names, tags or colours into something you can paste into a sentence or a config value.

Sometimes the line breaks should stay and only the gaps are the problem, which is what "Keep lines, collapse blanks" is for: every break is preserved and runs of empty lines are capped at none, one or two. Combined with "Collapse repeated spaces", that tidies text where someone aligned things by hand with spaces, or where converting from another format left three blank lines between every paragraph. Poems, addresses, code and bullet lists all want this mode rather than the paragraph join.

The limits are worth stating plainly. Hyphenation from a line break cannot be undone safely, so those joins leave a hyphen and a space for you to correct. Stripping HTML removes tags but not entities, so & and   survive as written. Everything else is faithful: no words are added, removed or reworded, and because the whole tool is JavaScript running in your browser, the text never leaves your device — you can paste a draft contract or an internal document without it being uploaded anywhere.

Frequently asked questions

Why does text copied out of a PDF break at the end of every line?
A PDF stores the position of each line of type rather than a flowing paragraph, so copying it hands you a real line break at the end of every visual line. Nothing is wrong with your clipboard — the breaks are genuinely in the text, and rejoining them is exactly what this tool is for.
Will it fix words that were hyphenated across a line break?
No, and it deliberately does not try. Removing a hyphen at a line end would also destroy genuinely hyphenated words like "well-known" or "e-mail". A word split as "inter-" and "national" therefore joins as "inter- national", which you fix by hand — usually a handful of cases per page.
What does the separator setting do?
It is the text inserted wherever a line break used to be. "Single space" is right for prose. "Nothing" joins the pieces with no gap at all, for rejoining one value that was wrapped mid-string. "Comma and space" or "Semicolon and space" turn a vertical list into an inline one, so three lines become "red, green, blue".
What is the difference between joining and keeping lines?
Joining gives you a single paragraph. "Keep lines, collapse blanks" preserves every line break and only caps how many blank lines may appear in a row — none, one or two. Keep the lines for a poem, an address block, a code snippet or a bullet list, where reflowing the text would wreck it.
Does "Strip HTML tags" properly clean up HTML?
It removes anything between angle brackets, which is enough for pasted markup like p, br and b tags. It is not an HTML parser, and two honest limits follow from that: entities such as &amp; are left exactly as written rather than turned back into "&", and text inside a <script> or <style> block remains as plain text. Read the result before you publish it.
Does it change anything I did not ask it to?
Two small things, both intentional. Spaces and tabs at the start and end of each line are always removed, since leaving them would produce double spaces as soon as the lines are joined, and blank space around the whole result is trimmed. Windows (CRLF) and Unix line endings are both recognised, so a file from either system behaves the same.