Back to Tools

Remove Line Breaks

Join multi-line text into a single continuous block

0
0
0
Input Text

Merge broken lines back into flowing text

Text copied from PDFs, emails and terminal windows is often chopped into short lines that end wherever the original page did. Paste it into a form, a tweet or a translation tool and you get awkward line breaks in the middle of sentences. Remove Line Breaks stitches those lines back together into one continuous block, with a couple of controls over how the joins are made.

Using it

  1. Paste your text into the Input Text box, use Paste, or load a .txt file with File. Characters, words and lines are counted at the top.
  2. Tick or untick Add space between lines. It starts ticked and puts a single space where each break was.
  3. Decide on Skip blank lines only, which starts unticked.
  4. Click Remove Line Breaks.
  5. The summary reports how many breaks were removed. Compare Before and After, then use Copy or .TXT, which downloads joined-text.txt.

What the two options mean

  • With Add space between lines on, the lines are joined with one space, which is what you want for ordinary sentences. Turn it off to glue lines directly together, which suits things like a long serial number, base64 string or URL that was wrapped across lines.
  • With Skip blank lines only on, empty lines are dropped before joining. With it off, each empty line still takes part in the join, so a blank line between paragraphs can leave a double space in the output.

Every line is also trimmed before joining, so indentation and trailing spaces do not pile up in the middle of the result.

Real-world uses

  • Reflowing a paragraph copied from a PDF so it reads as a single paragraph.
  • Making a multi-line address or list fit into a single spreadsheet cell.
  • Rebuilding a wrapped token, key or link into one string.
  • Preparing a long quote for a social post or a character-limited field.

Cautions

The tool cannot tell a hyphenated word split across two lines from a real hyphen, so a word broken as re- and then search would come out with its hyphen still in it. Paragraph structure is flattened, so if you want to keep paragraph gaps, remove only the single line breaks another way. The work runs in JavaScript in your browser page, and it will not change the input box, so you can try both spacing modes on the same text.

Related Articles


Related Tools






Frequently Asked Questions

Should I keep Add space between lines ticked?
Yes for normal prose, because it places one space where each break was so words do not fuse together. Untick it only when you are rebuilding one continuous string, such as a wrapped key, code or URL, that should contain no spaces.
What does Skip blank lines only do?
When ticked, empty lines are removed before the lines are joined, so they do not create extra spaces. When unticked, an empty line is still joined in, which can leave two spaces in a row where a paragraph gap used to be.
Can I keep paragraphs separate?
Not with this tool. All lines are joined into one block, including the gaps between paragraphs. If you need to keep paragraphs, process each paragraph separately or use a tool that only cleans up wrapped lines within paragraphs.
What happens to spaces at the start and end of each line?
Each line is trimmed before joining, so leading indentation and trailing spaces are dropped. That prevents doubled spaces at the joins when Add space between lines is on, and it also means any indentation used to set off a line is lost in the joined text.
Will it fix hyphenated words split across lines?
No. A word broken with a hyphen at the end of a line keeps that hyphen when the lines are joined, so re- followed by search becomes re- search. Fix those cases by hand in the result.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.