Remove Line Breaks Online

text
Loading feedback…

Remove line break characters from your text and join the lines back into flowing paragraphs. Choose whether to preserve paragraph breaks (blank lines), replace each break with a space, a comma, or nothing, and collapse the extra spaces that joining leaves behind. Handles LF, CR, and CRLF line endings from any source.

Last updated: July 12, 2026Author: Mateo DíazReviewed by: Riley Williams
Remove Line Breaks Online
In-browser
Remove line breaks from text, with paragraph and spacing controls
Characters: 0Words: 0Sentences: 0Lines: 0

Options

Characters: 0Words: 0Sentences: 0Lines: 0

What is a remove line breaks tool?

A remove line breaks tool deletes newline characters from text and joins the pieces back into flowing sentences. You need one most often right after copying text out of a PDF, an email reply, or a chat export, where every line ends after a few words and pasting it anywhere makes a mess. This tool removes every break or just the breaks inside paragraphs, replaces each one with a space, a comma, or nothing, and cleans up the leftover spacing. Everything runs in your browser; the text never leaves your device.

How to use it

  1. Paste your text into the input box. Hard-wrapped PDF copy, quoted emails, transcripts, and lists all work, up to 1 MB.
  2. Pick your settings. Three controls cover almost every cleanup job:
    • Preserve paragraph breaks (blank lines): merges the lines inside each paragraph but keeps the blank lines between paragraphs. Off by default; turn it on for anything longer than one paragraph.
    • Replace each line break with: a space (default), nothing, or a comma + space. Comma mode turns a vertical list into apples, bananas, cherries in one step.
    • Collapse extra spaces and trim lines: on by default. It trims each line before joining and squeezes repeated spaces, so you never get the word word double-space artifact.
  3. Copy the result. The output updates instantly; nothing to configure server-side because there is no server involved.

Which settings for which job

You haveSettingsResult
A PDF article, hard-wrapped mid-sentencePreserve paragraphs on, spaceReadable paragraphs, structure intact
One quote or sentence for a doc or slidePreserve paragraphs off, spaceA single clean line
A vertical list you need in one cell or a queryPreserve paragraphs off, comma + spaceitem, item, item
Text going into a system that forbids newlines (form fields, some CSV columns, JSON strings)Preserve paragraphs off, space, collapse onGuaranteed single line, single-spaced
Concatenated words like a tracking code split across linesPreserve paragraphs off, nothingPieces rejoined with no gaps

Example: before and after

Text copied from a two-paragraph PDF report arrives like this:

The quarterly report shows strong
growth in the northern region,
driven mostly by repeat customers.

Next quarter we plan to expand
into two new markets.

With Preserve paragraph breaks on, the tool returns:

The quarterly report shows strong growth in the northern region, driven mostly by repeat customers.

Next quarter we plan to expand into two new markets.

With it off, both paragraphs merge into one continuous line. Neither output has double spaces, because collapsing is on by default.

And the comma mode, for lists: apples / bananas / cherries / dates on four lines becomes apples, bananas, cherries, dates, ready for a spreadsheet formula, an SQL IN (...) clause, or an email To: field.

Why copied text is full of line breaks in the first place

Knowing the cause tells you which setting to use:

  • PDFs don't store paragraphs at all. A PDF is a page of positioned glyphs, and text extraction emits a newline wherever a visual line ends. That's why every line of a copied PDF ends after 60-odd characters, and why the preserve paragraphs mode exists: real paragraph boundaries usually survive as blank lines while the mid-sentence wraps don't deserve to.
  • Plain-text email is traditionally hard-wrapped by the sending client at around 72–78 characters per line (the email format standard recommends lines no longer than 78 characters). Quoted replies add > markers on top; strip those first with the text replacer, then remove the breaks here.
  • Word processors vs. plain text: in Word and Google Docs, Enter inserts a paragraph mark and Shift+Enter a soft line break. Both survive copy-paste as newlines, which is why a "single paragraph" from Word can still paste as several lines elsewhere.
  • Different systems, different characters: Windows ends lines with CRLF (\r\n), Linux and modern macOS with LF (\n), pre-2001 Mac files with CR (\r), and some apps emit the Unicode line separator (U+2028) or paragraph separator (U+2029). This tool normalizes all of them before joining, so you don't have to know which one you've got.

Remove line breaks without this tool

Sometimes the text lives in an app already and pasting it out is the wrong move. Here is the same cleanup in the tools people ask about most:

AppMethod
Microsoft WordCtrl+H (Find & Replace), search ^p for paragraph marks or ^l for soft breaks, replace with a space
ExcelIn-cell breaks: Ctrl+H, press Ctrl+J in the Find field (it types an invisible line break), replace with a space. Or the formula =SUBSTITUTE(A1,CHAR(10)," ")
Google Sheets=REGEXREPLACE(A1,"\n"," ") or the same SUBSTITUTE with CHAR(10)
Notepad++Ctrl+J joins selected lines; or Replace in Extended mode, \r\n → space
VS Code / regex editorsRegex replace \r?\n (space)
Terminaltr '\n' ' ' < input.txt or paste -sd' ' input.txt

The browser tool still wins for one-off jobs on copied text: no invisible Ctrl+J tricks, and you can see the result before committing.

Common problems

Words merged together

If the output reads strongergrowth, the breaks were replaced with nothing instead of a space. Switch Replace each line break with back to Space. This is also the classic failure of doing it by hand with an empty replacement.

Paragraphs disappeared

With preserve mode off, everything becomes one block by design. Turn on Preserve paragraph breaks, which treats one or more blank lines as a paragraph boundary. If your source marks paragraphs with indentation instead of blank lines (some ebook exports do), there is no blank line to preserve; you'll need to re-split manually.

There are still stray blank lines or weird spacing

Extra line breaks between every single line (double-spaced sources) merge fine in default mode. For remaining odd whitespace (tabs, non-breaking spaces), run the result through the whitespace remover, which handles the characters this tool deliberately leaves alone.

Hyphenated words split across lines

PDFs often break custom- / ers across lines. Joining gives custom- ers. No line-break tool can safely auto-fix this (removing every - would destroy real hyphens), so fix the few cases by hand with the text replacer.

Tips

  • To remove extra line breaks from double-spaced text while keeping real paragraphs, you may first need to know which blank lines are meaningful, so paste a small sample and test with preserve mode on before running the whole document.
  • Strip HTML or rich-text formatting first with the remove formatting tool or plain text converter; formatting artifacts often hide extra breaks.
  • Deduplicating a list? Remove duplicates with the duplicate line remover before joining with commas; after joining, the duplicates are invisible to line-based tools.
  • Sanity-check long merges with the sentence counter: if a 40-sentence article comes back as 3 sentences, breaks were removed where periods were missing in the source.

Related tools

Privacy and security

Everything runs locally in your browser. Nothing you paste is uploaded, logged, or stored, which matters when the text you're cleaning is a contract PDF or an internal email thread.

Frequently Asked Questions
It removes line break characters (newlines) from your text and joins the lines with a space, a comma, or nothing. You can remove every break to get a single line, or preserve paragraph breaks so blank-line-separated paragraphs stay separate.
Yes. Turn on "Preserve paragraph breaks" and the tool only merges lines within each paragraph. Blank lines between paragraphs are kept, which is the right setting for text copied from PDFs or emails.
No, as long as "Collapse extra spaces" stays on (the default). It trims each line and collapses repeated spaces so joined text reads cleanly. Turn it off if you need the original spacing untouched.
Yes, it handles all common line break types including LF (\n), CR (\r), and CRLF (\r\n), so text from Windows, macOS, Linux, and old Mac exports all work.