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
- Paste text that has line breaks in the wrong places.
- Pick whether to keep paragraph breaks and what to replace each break with.
- 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
Removing line breaks: before and after
| Where the text came from | What you paste | After removing line breaks |
|---|---|---|
| A break at the end of every printed line | Sentences rejoined into paragraphs that reflow to any width | |
| Email reply | Short quoted lines wrapped at 70 characters | One clean paragraph per message |
| Subtitle file | Two-line captions with a break mid-sentence | Continuous dialogue you can quote or translate |
| OCR scan | Lines that sometimes end mid-word | Joined with the nothing option so split words close up |
| Spreadsheet column | One value per line | A 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.