Remove line breaks from text
Updated on October 30, 2026
Paste a text with too many line breaks and join everything into one line, using a space, comma or another separator. You can keep paragraphs apart and only join the lines inside each one, which fixes text copied from a PDF. Your text never leaves your browser.
Line breaks removed: 0
The text is processed in your browser and is not sent anywhere.
How to use it
- Paste the text in the first box.
- Under "Join the lines with", choose the separator: space (the most common), comma, semicolon, vertical bar or nothing.
- Tick "Keep paragraphs apart" if the text has paragraphs separated by blank lines and you want to preserve them.
- Copy the result. The summary shows how many line breaks were removed.
When this helps
- Text copied from a PDF, where each line ends where the page line ended, even in the middle of a sentence.
- Forwarded emails, where each line was broken by the email program.
- A list of items, one per line, that has to become a single line to paste into a form field, a search or a spreadsheet.
- Keywords, codes or numbers that come in a column and need to be separated by commas.
- Text that will be pasted into fields that do not accept several lines, such as a username, a title or a short message.
With or without paragraphs
Without the keep paragraphs option, the whole text becomes a single line, and blank lines disappear. With the option on, a blank line still separates each paragraph, and only the lines inside each paragraph are joined. It is the right choice for PDF text with several paragraphs.
If your PDF text has words cut with a hyphen at the end of a line ("dis-" on one line and "tant" on the next), use the clean formatting tool, which also puts those words back together.
Choosing the separator
- Space: the default for running text. Lines become continuous sentences.
- Comma and space: good for lists ("apple, banana, orange").
- Semicolon: used when the items themselves contain commas.
- Vertical bar: useful to separate fields visibly.
- Nothing: glues the lines together without a space, to join parts of a code or a number that was broken across several lines.
Frequently asked questions
- Is this the same as the clean formatting tool?
- No. This one focuses on line breaks and lets you choose the separator. The clean formatting tool joins paragraph lines too, but also handles invisible characters, curly quotes and bullets.
- Are blank lines deleted?
- Yes, unless you keep the paragraphs. In that case, blank lines between paragraphs stay.
- Can I do the opposite, break a text into lines?
- Yes, with the list to comma-separated text tool: it turns comma-separated text into a list, one item per line.
- Is the text sent to a server?
- No. Everything happens in your browser.
Read also
- List to comma-separated text (and back)Lines to commas, with quotes, and the way back.
- Number lines and add text to the start and endNumbers lines and puts text at the start or end of each.
- Word and character counter onlineWords, characters, reading time and social media limits.