Logo

MonoCalc

/

Line Break Remover

Text
Enter or paste some text to clean.
0 lines0 words0 chars0 Blongest line 0

Load sample text

Mode

Joins the soft wraps inside each paragraph and keeps blank lines between paragraphs. Best for prose copied out of a PDF.

Each removed break becomes a space.
Escapes \n, \t, \r and \s are interpreted.
Written between preserved paragraphs. Max 20 characters.
Terminator used by the modes that keep your line structure.
Greedy re-wrap of the result. 0 leaves it unwrapped.
Only matching lines are joined. Leave empty to join everything.

Preserve paragraph breaks

Trim each line

Collapse multiple spaces

Remove empty lines

Keep list items

Keep hyphenated words

Nothing to clean yet

Paste hard-wrapped text above, or load one of the samples to see how each mode behaves.

About This Tool

Line Break Remover – Unwrap Hard-Wrapped Text in Your Browser

Text copied out of a PDF, an e-book, a plain-text email, a terminal window, or a chat log almost never arrives clean. It arrives with hard wraps baked in at roughly 72 to 80 columns, because whatever produced it was formatting for a fixed-width page rather than for your screen. Paste that into a CMS, a form field, a spreadsheet cell, or an AI prompt and you get ragged, broken paragraphs. A line break remover repairs exactly that, and this one runs entirely in your browser — nothing is uploaded.

Why a plain find-and-replace is not enough

The obvious fix is to replace every newline with a space. It works for a single paragraph and destroys everything else. Blank lines between paragraphs vanish, so a three-page document becomes one enormous run-on block. Bullet lists collapse into a sentence. Words that a justified PDF split across lines stay split, leaving exam- ple stranded mid-sentence.

The real distinction is between a soft wrap — a break inserted purely because the line ran out of room — and a break that carries meaning. Soft wraps should become a space. A blank line, a bullet marker, and a numbered list item are structure and should survive. Smart mode makes that distinction automatically and is the correct default for prose.

Choosing a mode

Remove all line breaks flattens everything into one continuous line, which is what you want for minifying a multi-line JSON, SQL, or log payload. Join with separator turns a vertical list into a delimited string — a column of names becomes apple, banana, cherry for pasting into a query or a tag field. Remove blank lines only keeps every real break and just compacts double-spaced text. De-hyphenate repairs words broken across lines before joining, which is the mode built for two-column academic PDFs. Flatten for one cell removes breaks and collapses whitespace so a multi-line address fits a single spreadsheet cell or form input.

Line endings: CRLF, LF, and CR

Three conventions are still in circulation. Windows terminates lines with \r\n, Unix, Linux, macOS and Git use a bare \n, and classic Mac OS used a bare \r. A file with the wrong one opens as a single unreadable line in some editors, and a file with a mixture produces Git diffs where every line appears to have changed. The tool detects the mix in your input, shows the breakdown as a composition bar, and Normalize line endings mode converts them all to one convention without touching your line structure.

See what you are about to delete
Turn on Show invisibles to render whitespace as glyphs — ¶ for a kept break, ␍␊ for a CRLF, · for a space, and → for a tab. The separators written where a break was removed are highlighted, so the transformation is visible rather than magical. The block map above it shows which runs of source lines were folded into each output line.

Whitespace hygiene and re-wrapping

Joining lines exposes whitespace problems that were previously hidden at the end of each line. Trim each line strips leading and trailing whitespace before joining, so indented PDF text does not leave a double space at every seam. Collapse multiple spaces squashes any remaining runs into one. If your destination still needs a fixed width, set Max output line length and the joined text is greedily re-wrapped at that column — useful for producing a clean 80-column plain-text email from messy source material.

Advanced control

Power users get two extra levers. The custom separator field understands the escape sequences \n, \t, \r and \s, so you can join with a tab for spreadsheet paste or with a literal trailing space that would otherwise be invisible in an input box. The regex line filter restricts joining to lines matching a pattern — ^\s*\w joins only lines starting with a word character, leaving anything else on its own line.

Reading the statistics

Every pass reports lines, characters, words, and bytes before and after, plus breaks removed, blank lines removed, paragraphs preserved, and the longest resulting line. The byte figure is true UTF-8 size, so it shows the real saving from stripping carriage returns out of a large file. Characters are reported both as code units and as Unicode code points, which differ whenever emoji or CJK surrogate pairs are present. Results can be copied, downloaded as a .txt, exported as a CSV pairing each source line with its resulting block, or fed straight back into the input with the swap button.

Frequently Asked Questions

Is the Line Break Remover free?

Yes, Line Break Remover is totally free :)

Can I use the Line Break Remover offline?

Yes, you can install the webapp as PWA.

Is it safe to use Line Break Remover?

Yes, any data related to Line Break Remover only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Line Break Remover work?

Every terminator in your text — CRLF, CR, LF, and the rarer U+2028, U+2029, form feed and vertical tab — is first normalised to a single newline so the rest of the pipeline only has one case to handle. The text is then split into lines, cleaned line by line, grouped into blocks that each become one output line, and rejoined with the separator you chose. Because grouping is a separate step from joining, the tool can delete a soft wrap while leaving a paragraph gap alone.

Why does Smart mode keep some line breaks?

A break in the middle of a sentence is a wrapping artefact and should become a space, but a blank line almost always marks a real paragraph boundary. Smart mode joins the first kind and preserves the second, which is why it is the right default for prose copied out of a PDF. Remove All mode ignores that distinction and returns one continuous line.

What is the difference between CRLF, LF, and CR?

Windows ends lines with a carriage return followed by a line feed (CRLF), Unix, Linux, macOS and Git use a bare line feed (LF), and classic Mac OS before version 10 used a bare carriage return (CR). Mixing them is what makes a file open as one giant line in Notepad or show up as a whole-file change in a Git diff. Normalize Line Endings mode converts every terminator to one convention without touching your line structure.

What does de-hyphenation do?

Justified two-column PDFs break long words across lines with a trailing hyphen, so copying gives you text like 'exam-' followed by 'ple'. De-hyphenate mode rejoins those fragments into 'example' before the normal paragraph joining runs. Only letter-hyphen-letter joins are merged, so command-line flags and dates ending in a hyphen are left intact.

Will removing line breaks damage my bullet lists?

Not while Keep list items is on. Lines beginning with a dash, asterisk, bullet character, or a number followed by a dot or bracket start their own block instead of being folded into the previous line, so Markdown and plain-text lists survive the pass. A wrapped continuation line underneath a bullet is still joined back onto that bullet.

Is my text uploaded anywhere?

No. All splitting, joining, and counting happens in your browser with plain JavaScript, and nothing is sent to a server — which matters because this tool is most often pointed at unpublished drafts, support transcripts, and internal documents. Files you drag in are read locally by the browser, and inputs up to a million characters are processed with a short debounce so typing stays responsive.