How to use Remove Line Breaks
- Paste your text into Your text. The sample is a paragraph copied from a PDF, with breaks in the middle of sentences.
- Choose a Mode: Replace with spaces, Keep paragraph breaks or Join with nothing.
- Copy the result.
What it does and when to use it
Text often arrives with line breaks in the wrong places. PDFs break a line wherever the page edge was. Plain-text emails wrap at a fixed width. Terminal output and copied subtitles put every phrase on its own line. Pasted into a document, a form or a social post, that text looks broken.
Each mode fixes a different case:
- Replace with spaces makes one line from everything, including separate paragraphs. Good for single-line fields: a product title, an alt text, a CSV cell, a search box.
- Keep paragraph breaks joins the lines inside each paragraph but keeps one blank line between paragraphs. Good for articles, letters and notes copied from a PDF.
- Join with nothing deletes the breaks without adding anything. Good for a long URL, an API key or encoded data that was wrapped by an email program.
If your text came from a PDF with hyphenated line ends, the Text Unwrapper can also re-join split words. To go the other way and break long lines at a set width, use the Text Wrapper. If you only want to delete the empty lines and keep the rest, use Remove Empty Lines.
How it works
- Replace with spaces finds each group of one or more line breaks, together with any spaces or tabs on either side, and replaces the whole group with a single space. Then it trims the start and end of the text.
- Keep paragraph breaks splits the text into paragraphs at blank lines (a line with only spaces counts as blank). Inside each paragraph, every line break and its surrounding spaces become one space. Paragraphs are joined again with one blank line between them.
- Join with nothing removes every line break character and nothing else.
All three run in your browser.
Worked examples
The first two examples use a five-line passage from a PDF: “This sentence was / broken by a PDF / reader.”, a blank line, then “New para- / graph here.”
Replace with spaces. Everything becomes one line: This sentence was broken by a PDF reader. New para- graph here. The blank line between paragraphs is gone too.
Keep paragraph breaks. The result is two paragraphs, “This sentence was broken by a PDF reader.” and “New para- graph here.”, with one blank line between them. The hyphen stays because this tool does not re-join split words.
Join with nothing. A key copied as “ABC12”, “DEF34” and “GH” on three lines becomes ABC12DEF34GH.
Limits and tips
- Bullet points and numbered lists are joined like any other lines; their markers stay in the text.
- Check a long single line with the Character Counter if it must fit a limit.
Frequently asked questions
Which mode should I pick?
Does it handle Windows line endings?
Why does "para- graph" keep its hyphen?
Are double spaces cleaned up?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.