How to Remove Line Breaks From Text
Turn multi-line text into one paragraph, with a space, comma, or custom separator between lines — while keeping paragraph structure if you need it.
By QR Ivify Team
Copy an address or a list out of a PDF and every line breaks mid-sentence. Paste a multi-line entry into a form field that only accepts one line. Get text from an OCR tool that inserted a line break at every wrapped line instead of every actual paragraph. All of these need the same fix: turning multiple lines back into one continuous block of text.
Why This Isn't Just "Delete the Line Breaks"
The naive approach — deleting every \n — jams words together with no space between them ("line onethis is line two"). What you actually want is to replace each line break with something that keeps the words readable: usually a space, sometimes a comma, occasionally a custom separator depending on what the joined text is for.
Step by Step
- Open Remove Line Breaks.
- Paste your multi-line text.
- Choose what replaces each line break — a space, a comma, a pipe, or a custom separator you type in.
- Turn on "Preserve paragraphs" if blank-line-separated blocks should stay as separate paragraphs rather than merging into one block.
- Copy or download the joined result.
A Worked Example
Input:
This is line one.
This is line two.
This is line three.
With a space separator:
This is line one. This is line two. This is line three.
What "Preserve Paragraphs" Actually Does
If your text has multiple paragraphs separated by blank lines, turning on "Preserve Paragraphs" removes the line breaks within each paragraph while keeping the blank line between paragraphs — so a multi-paragraph document collapses each paragraph into one line, without merging separate paragraphs into a single wall of text. This is the setting to use when you're fixing mid-sentence wrapping (common from PDFs and OCR output) but still want the document's overall structure intact.
Frequently Asked Questions
Can I use a custom separator instead of a space?
Yes — choose "Custom…" and type any separator, like " | " or ", ".
What does "Preserve paragraphs" do? It keeps blank-line-separated blocks as separate paragraphs in the output, only removing the line breaks inside each paragraph rather than flattening the whole text into one block.
Are empty lines removed automatically? Only if "Remove empty lines" is on — it's on by default, but you can turn it off to keep blank lines as empty joins.
Will this work on Windows-style line endings?
Yes — both Windows (\r\n) and Unix (\n) line endings are handled correctly.
Does this upload my text anywhere? No. Joining happens entirely in your browser.
Try It
Need to turn multi-line text into one paragraph or one line? QR Ivify's free Remove Line Breaks tool supports custom separators and paragraph preservation. Also dealing with extra spaces or blank lines? Try Text Cleaner first.
Related articles
How to Change Text Case Online — UPPERCASE, Title Case & More
Convert text between UPPERCASE, lowercase, Title Case, Sentence case, and more, without losing line breaks — and what actually separates Title Case from Capitalize Each Word.
How to Clean Up Messy Text (Extra Spaces, Blank Lines, Tabs)
Fix text that came through with irregular spacing, blank lines, or tabs — from pasting out of a PDF, a webpage, or a spreadsheet — with cleanup options you control individually.
How to Compare Two Texts and See What Changed
Compare two versions of a document, email, or config file line by line and see exactly what was added or removed — the algorithm behind it, explained simply.