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
- Paste your text into the input box. Hard-wrapped PDF copy, quoted emails, transcripts, and lists all work, up to 1 MB.
- 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, cherriesin 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 worddouble-space artifact.
- Copy the result. The output updates instantly; nothing to configure server-side because there is no server involved.
Which settings for which job
| You have | Settings | Result |
|---|---|---|
| A PDF article, hard-wrapped mid-sentence | Preserve paragraphs on, space | Readable paragraphs, structure intact |
| One quote or sentence for a doc or slide | Preserve paragraphs off, space | A single clean line |
| A vertical list you need in one cell or a query | Preserve paragraphs off, comma + space | item, item, item |
| Text going into a system that forbids newlines (form fields, some CSV columns, JSON strings) | Preserve paragraphs off, space, collapse on | Guaranteed single line, single-spaced |
| Concatenated words like a tracking code split across lines | Preserve paragraphs off, nothing | Pieces 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:
| App | Method |
|---|---|
| Microsoft Word | Ctrl+H (Find & Replace), search ^p for paragraph marks or ^l for soft breaks, replace with a space |
| Excel | In-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 editors | Regex replace \r?\n → (space) |
| Terminal | tr '\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
- Whitespace remover - collapse tabs, non-breaking spaces, and other leftover whitespace.
- Duplicate line remover - clean lists before merging them.
- Plain text converter - strip HTML and formatting before break removal.
- Text replacer - targeted find-and-replace for quote markers and stray hyphens.
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.