Remove Line Breaks

Paste text with line breaks and instantly join it into one clean block — with a space, with nothing, or Smart mode that keeps paragraphs and fixes PDF copy-paste wrapping.

Every line break becomes a single space.

Paste text above to remove line breaks

Why removing line breaks is trickier than "just delete \n"

A line break looks like a single, simple thing, but text arrives with line breaks for several different reasons, and each one calls for a different fix. A spreadsheet cell might have a manual line break you want gone entirely. A PDF paragraph copied into a text box comes with a hard line break at the end of every printed line, even mid-sentence — deleting those the wrong way glues words together (helloworld) instead of leaving a space (hello world). And a document with real paragraphs has blank lines you usually want to keep, so a blanket "delete all newlines" pass would flatten your paragraphs into one giant run-on block. This tool gives you three explicit, predictable ways to join lines instead of one guess-and-check regex, and shows you exactly how many line breaks were removed and how the character count changed.

The three join modes explained

Worked examples

Example 1 — a list, "space" mode. Input:

Apples
Bananas
Cherries

Output: Apples Bananas Cherries — three lines become one line, cleanly separated by single spaces.

Example 2 — a split identifier, "nothing" mode. Input:

data-i18n-
placeholder

Output: data-i18n-placeholder — the two fragments were meant to be one token, so gluing them with no space reconstructs the original.

Example 3 — a PDF paragraph, "Smart" mode. Input (each line ends where the printed page happened to wrap):

This report summarizes the
quarterly results and outlines
next steps for the team.

A second paragraph starts
here, after the blank line.

Output: This report summarizes the quarterly results and outlines next steps for the team. followed by a blank line, then A second paragraph starts here, after the blank line. — the two paragraphs stay separated, but the awkward mid-sentence breaks are gone.

Where this comes up

SourceTypical problemBest mode
Text copied from a PDFEvery printed line has a real line break, even mid-paragraphSmart
Spreadsheet or CSV cellA manual line break inside one cell breaks import/exportJoin with a space
Address or list pasted into a single-line fieldField only accepts one lineJoin with a space
Word or code split across two lines by accidentNeed the fragments glued back together exactlyJoin with nothing
Song lyrics, poetry, or scripts with real stanza breaksWant paragraph/stanza structure keptSmart

What Smart mode does — and does not — do

Privacy and reliability

Every transformation runs with plain JavaScript string operations directly in your browser tab. Nothing you paste is sent to a server, logged, or uploaded anywhere, which makes this safe to use on drafts, internal notes, or anything else you'd rather not paste into a random web form. Your last input and selected mode are optionally remembered in this browser's local storage so the tool is ready again next time you open it; you can turn that off at any time.

Sources & further reading

Frequently asked questions

How do I remove line breaks from a block of text?

Paste your text into the box above and pick a join mode: “Join with a space” replaces every line break with a single space so words never run together, “Join with nothing” deletes every line break outright with no space added, and “Smart” keeps blank-line paragraph breaks while only unwrapping single hard-wrapped lines inside each paragraph. The result updates instantly as you type or paste, and a Copy result button puts the cleaned text on your clipboard in one click.

What's the difference between “Join with a space” and “Join with nothing”?

“Join with a space” turns every line break — including the blank line between paragraphs — into a single space, so “Hello” and “world” on two lines become “Hello world”. “Join with nothing” removes only the line break character and adds no space, so the same input becomes “Helloworld”; use this when your source text already ends each line with a trailing space, or when you specifically want two broken halves of a word glued back together.

How does Smart mode fix text copied from a PDF?

PDF readers and many apps insert a real line break at the end of every printed line, even in the middle of a paragraph — this is called hard wrapping. Smart mode looks for blank lines to find where paragraphs actually end, then joins every hard-wrapped line inside a paragraph with a single space while leaving the paragraph break untouched. The result reads like normal flowing text instead of a jagged column of short lines, which is exactly the PDF copy-paste fix most word processors don't offer on their own.

Will Smart mode delete the blank lines between my paragraphs?

No — Smart mode is designed to preserve paragraph structure, not remove it. Wherever your original text has one or more blank lines, the result keeps exactly one blank line, so paragraphs stay visually separated. Only the hard line breaks inside a paragraph — the ones caused by word-wrapping — are unwrapped into a single line. If you want paragraph breaks removed too, switch to “Join with a space” or “Join with nothing” instead.

Is my text uploaded to a server?

No. Every transformation runs entirely inside your browser — the text you paste is never sent to a server, logged, or shared anywhere. Your most recent text and selected mode are optionally saved to this browser's local storage so they're still here next time you open the page; untick “Save my text in this browser” to keep it in memory for this session only, and clearing the box removes the stored copy immediately.