Remove Line Breaks

Remove line breaks from pasted text and join broken lines into clean, flowing paragraphs. The cleaned text appears live as you paste, with options to keep blank-line paragraph breaks or to replace every break with a space, a comma or nothing. Copy the result in one click.

Remove Line Breaks tool

How to use it

  1. Paste text that has line breaks in the wrong places.
  2. Pick whether to keep paragraph breaks and what to replace each break with.
  3. Copy the cleaned text.

What is a line break remover?

A line break remover deletes newlines, the hidden characters that end each line, and joins the text back into flowing paragraphs. This tool replaces every line break, along with any spaces around it, with a separator you choose.

output = each line break (plus surrounding spaces) replaced by
a space, a comma, or nothing; blank lines optionally kept as paragraphs

With the paragraph option on, a blank line is treated as a real paragraph break and left alone; only the single newlines inside a paragraph are removed. Windows carriage returns and Mac or Linux line feeds are both handled, so text from any system cleans the same way, and trimming the spaces at each join means you never end up with a double space.

Worked example

Input: Line 1 ⏎ Line 2 ⏎ Line 3
Result: Line 1 Line 2 Line 3

Removing line breaks: before and after

Where the text came fromWhat you pasteAfter removing line breaks
PDFA break at the end of every printed lineSentences rejoined into paragraphs that reflow to any width
Email replyShort quoted lines wrapped at 70 charactersOne clean paragraph per message
Subtitle fileTwo-line captions with a break mid-sentenceContinuous dialogue you can quote or translate
OCR scanLines that sometimes end mid-wordJoined with the nothing option so split words close up
Spreadsheet columnOne value per lineA single comma-separated line ready for a tag or To field

Why remove line breaks?

Text copied from a PDF, an email or a terminal window often carries a hard line break at the end of every visual line. Those breaks were only there to fit the original page width, so when you paste the text somewhere with a different width it comes out as short, ragged lines. Removing them rejoins the words into ordinary paragraphs that reflow to any width.

With ‘Keep paragraph breaks’ on, the tool treats a blank line as a paragraph boundary and leaves it alone; only the single breaks inside a paragraph are replaced. Turn it off to fold the whole text into one block, which is what you want for a single database field, a form that rejects newlines, or a one-line list.

What replaces the break

A space is the normal choice for prose. ‘Nothing’ is for text where lines ended mid-word, which some OCR output does, or for languages such as Chinese and Japanese that put no space between words. ‘A comma and space’ turns a column of items into a comma-separated line ready for a spreadsheet, a tag field or a function argument. Spaces on either side of a break are trimmed first, so you never get a double space at the join.

The same job in other apps

In Microsoft Word, open Find and Replace with Ctrl+H, search for ^p (a paragraph mark) or ^l (a manual line break) and replace with a space. Notepad++ and VS Code accept \n in regular expression mode. Google Docs has no built-in way to do it, so pasting here and copying back is faster. Windows text ends lines with a carriage return plus a line feed while Mac and Linux use a line feed alone; the tool handles both, so text from any system cleans the same way.

Common uses

  • Fixing text copied out of PDFs and emails
  • Reformatting code comments into prose
  • Turning a list into a single comma-separated line
  • Cleaning subtitles or OCR output
  • Preparing an address or quote for a single form field
  • Joining a column of values into one line for a spreadsheet

When to use it

  • You need to remove line breaks from PDF text before pasting it into a document that should reflow.
  • A column of email addresses has to become one comma-separated line for a To field.
  • A shipping address must fit into a single form field that rejects newlines.
  • You are cleaning subtitles or OCR output where every line ends in the wrong place.
  • Quoted text from an email needs to read as one paragraph in your reply.

Related tools

Remove Extra Spaces is the follow-up step when the joined text still has double spaces or stray tabs inside the lines.

Remove Duplicate Lines is the one to reach for when the lines themselves are the data and repeats need to go before you join anything.

Find and Replace Text gives you full control, replacing \n with any pattern when these preset options are not enough.

Frequently asked questions

Yes, if you leave ‘Keep paragraph breaks’ checked. Blank lines between paragraphs are preserved while single line breaks inside a paragraph are removed. Uncheck it to join everything into one block, which is useful for a form field that does not accept multiple lines.
Yes. Choose ‘a comma and space’ to turn each broken line into a comma-separated list. A column of 20 email addresses becomes one line you can paste straight into a To field, and a column of keywords becomes a tag list.
Press Ctrl+H to open Find and Replace, type ^p in the Find box (or ^l for a soft line break made with Shift+Enter), type a space in the Replace box and click Replace All. That joins every paragraph, so do it on a selection if you want to keep some breaks.
A PDF stores each printed line as a separately positioned piece of text, so the copy command reproduces the layout, breaking wherever the page did. Some PDFs also leave a hyphen where a word was split at the margin. Paste the text here to rejoin the lines, then fix any split words with the find and replace tool.
Only the spaces next to a line break. Spaces around each break are trimmed as it is replaced, so you will not get two spaces at a join. Double spaces elsewhere in the text are left as they are; run the result through the remove extra spaces tool if you need those collapsed as well.
In this tool a single break (one press of Enter) is a line break and a blank line (two presses) is a paragraph break. Word makes the same distinction: Shift+Enter inserts a soft line break inside a paragraph, while Enter starts a new paragraph with its own spacing.
No. Everything runs in your browser with a few lines of JavaScript, and nothing is sent to a server. You can paste a whole book chapter and the cleaned version appears instantly, because there is no upload and no processing queue.