Remove Line Breaks
Join multi-line text into a single continuous block
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
- 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.
- Tick or untick Add space between lines. It starts ticked and puts a single space where each break was.
- Decide on Skip blank lines only, which starts unticked.
- Click Remove Line Breaks.
- 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.
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