Line Break Remover
Paste text with unwanted breaks and get flowing paragraphs back, or swap every break for a comma or any separator you choose.
Joining broken lines
- Copy the text with the awkward breaks. A paragraph lifted from a PDF, with a break at the end of every printed line, is the classic case.
- Choose what should replace each break. A space gives you a normal flowing paragraph. A comma and space turns a list into one comma-separated line. Nothing joins the lines with no gap, and Custom text lets you use anything you like.
- Leave Keep paragraph breaks ticked if your text has blank lines between paragraphs and you want to keep them. Untick it to squash the whole text into one line.
- Copy the joined text or download it. The result updates as you change any option.
How to remove line breaks from text copied from a PDF
PDFs are laid out for printing, so every line of text ends where the printed line ended, not where a sentence ended. Copy a paragraph from a PDF and paste it into a document or a form, and you get a ragged column of short lines instead of a paragraph. Fixing it by pressing Delete at the end of every line is painful when a page has forty lines.
Paste the text into this tool with A space selected and Keep paragraph breaks ticked. Each line is trimmed and joined to the next with one space, while the blank lines between paragraphs stay in place. The result is clean, flowing paragraphs. This is the setting to use for research papers, ebooks, scanned documents and anything else copied from a fixed layout.
Two things can still go wrong with PDFs. Words that were hyphenated at the end of a line, such as “informa-” on one line and “tion” on the next, will come out as “informa- tion”. Search for the hyphen and space with the find and replace tool and remove it. And if some paragraphs lack a blank line between them, you will need to put those breaks back by hand.
Turn a list into a comma-separated line (and the other way round)
Lots of tools want a single line of values separated by commas: tags for a blog post, a list of email addresses to paste into the To field, keywords for an ad group, IDs for a database query, or a list of names for a function. If your data is a column, with one item per line, choose A comma and space, untick Keep paragraph breaks and you have one tidy line.
For SQL or code, pick Custom text and enter something like ', ' as the separator, then add the opening and closing quotes yourself. If you need to go from a comma-separated line back to a list, use the find and replace tool to swap each comma for \n, which means a new line.
Keep paragraph breaks or remove every line break
A line break is a single press of Enter. A paragraph break is two, which leaves a blank line. With Keep paragraph breaks ticked, the tool treats blank lines as real paragraph boundaries and only joins the lines within each paragraph. With it unticked, every break goes, including the blank lines, and everything is merged into one block of text.
| Setting | Best for |
|---|---|
| Space + keep paragraphs | Text from PDFs, emails and chats |
| Space, paragraphs off | A single paragraph for a form field or tweet |
| Comma and space, paragraphs off | Turning lists into comma-separated values |
| Nothing | Joining code, tokens or IDs that were split over lines |
| Custom text | Pipes, semicolons, HTML tags such as <br> |
Why other line break problems appear on Windows and Mac
Different systems mark line breaks differently. Windows uses two invisible characters (carriage return and line feed), while Mac and Linux use only one (line feed). Older Mac files used a lone carriage return. The tool recognises all three, so text from any system is joined properly without leaving stray invisible characters behind.
Each line is also trimmed before joining, so you will not end up with double spaces where a line ended in a space and the next began with one. If double spaces still appear, run the result through the extra space remover.
Line break questions
How do I remove line breaks from text online?
Paste your text into the box, choose what should replace each break (usually a space) and copy the result. It works instantly, with no upload.
How do I remove line breaks but keep paragraphs?
Keep Keep paragraph breaks ticked. Single breaks inside a paragraph are joined and blank lines between paragraphs are preserved.
How can I convert a list to a comma-separated string?
Paste the list, choose A comma and space and untick Keep paragraph breaks. Each line becomes an item in one line separated by commas.
Does it work on text from Word, Excel or Google Docs?
Yes. Whatever you can copy as plain text works, including cell ranges from spreadsheets where each row is a line.
Can I replace line breaks with a custom character?
Yes. Choose Custom text and type what you want, such as a pipe, a semicolon, a tab-like gap or an HTML tag.
What is the difference between this and the extra space remover?
This tool joins lines together. The extra space remover cleans spacing and blank lines but leaves your lines in place.
Finish the cleanup with
If the joined text still has uneven gaps between words, pass it through the extra space remover. To fix hyphenated words left over from a PDF, find and replace does it in one pass. Turning a list into comma-separated values? Run it through remove duplicate lines first, then count the result with the word counter.