Remove Line Breaks From Text Online
Paste text and strip every line break instantly. Replace breaks with a space, join lines with nothing, or keep paragraph splits — it normalizes Windows, Unix, and Mac line endings, runs 100% in your browser, and is free.
Before
0
chars · 0 breaks
After
0
chars · 0 breaks
Features
Three Strip Modes
Replace breaks with a space, remove them entirely, or keep blank-line paragraph splits
Normalizes Every Line Ending
Handles Windows CRLF, Unix LF, and classic Mac CR so mixed sources clean up the same
Live Output
The cleaned text updates the instant you type, paste, or change an option
Collapse Spaces & Trim
Optionally squash runs of spaces into one and trim leading or trailing whitespace
Before & After Counts
See character and line-break totals for both the input and the result side by side
Private & Free
All processing runs locally in your browser with no uploads and no signup
Remove Line Breaks: strip newlines, join lines, or keep paragraphs
A remove line breaks tool deletes the newline characters that split text across lines. Paste any text, pick a mode — replace each break with a space, remove breaks entirely, or keep blank-line paragraph breaks — and copy the clean result. It normalizes Windows, Unix, and Mac line endings, runs 100% in your browser, and is free with no signup.
How to remove line breaks from text
- Paste or type your text into the Input box, or hit the paste icon to pull from your clipboard.
- Pick a mode: Replace with a space (the default) for flowing text, Remove entirely to join lines with nothing, or Keep paragraph breaks to preserve blank-line gaps.
- Optionally tick Collapse multiple spaces and Trim to tidy the spacing left behind after joining lines.
- The cleaned text appears in the Result panel instantly, with live before-and-after character and line-break counts.
- Click Copy to send the result to your clipboard. The original input stays put so you can try another mode.
How line breaks actually work
A line break is not one universal character. Three conventions are still in active use: Unix and macOS use a single line feed, LF (\n, byte 0x0A); Windows uses a carriage return followed by a line feed, CRLF (\r\n); and classic Mac OS (pre-OS X) used a lone carriage return, CR (\r, byte 0x0D). Text copied from PDFs, emails, and Windows apps frequently carries CRLF, which is why a one-character find-and-replace so often leaves a stray symbol or a half-removed break behind.
This tool fixes that by normalizing first: it converts every \r\n and lone \r to a single \n before doing anything else, so all three conventions behave identically. Per the W3C's internationalization guidance and the ECMAScript line-terminator rules, an application should treat CR, LF, and the CRLF pair as equivalent line boundaries — exactly the normalization step this tool applies.
"The characters CR (U+000D), LF (U+000A), and the sequence CR LF are all treated as a single line terminator."— ECMAScript Language Specification, Line Terminators
Worked examples: input → output
"line one ↵ line two" · replace with a space
line one line two
A hyphenated word split "data↵base" · remove entirely
database
Two paragraphs separated by a blank line · keep paragraph breaks
First paragraph joined into one line.
Second paragraph joined into one line.
Edge case · mixed CRLF + lone CR
Paste text where one break is Windows \r\n and the next is an old-Mac \r, and a plain \n replace would leave a dangling carriage return on every Windows line and miss the Mac break entirely. This tool normalizes both to \n first, so a single space (or nothing) replaces each break with no leftover invisible characters.
Line-ending reference: which platform uses what
These are the newline conventions the tool normalizes before stripping. Knowing which one your source uses explains why a naive replace often leaves blank lines or stray characters.
| Name | Escape | Bytes | Used by |
|---|---|---|---|
| LF (Line Feed) | \n | 0x0A | Linux, macOS, Unix, web, JSON |
| CRLF | \r\n | 0x0D 0x0A | Windows, HTTP headers, SMTP email, CSV |
| CR (Carriage Return) | \r | 0x0D | Classic Mac OS (pre-OS X), some legacy apps |
| LS / PS | U+2028 / U+2029 | Unicode | Line & paragraph separators in some editors |
The hidden carriage return that breaks copy-paste
The single most common line-break bug is invisible: a Windows CRLF looks like one line break but is two characters. Replace only \n with a space and you leave a stray \r on every line — which shows up as a phantom space, a box glyph, or a broken match in code, search boxes, and spreadsheets. That is why this tool always normalizes \r\n and lone \r to \n before it strips anything.
The Keep paragraph breaks mode is smarter than a blanket replace, too: it splits on a run of blank lines first, joins single newlines inside each paragraph to a space, then re-joins the paragraphs with one blank line. So a document with hard-wrapped lines becomes clean flowing paragraphs — ideal for reflowing PDF or email text without merging everything into a single wall of words.
Runs 100% in your browser
Your text never leaves your device. Every break is stripped locally in JavaScript and copying uses your browser's native clipboard — no uploads, nothing leaves your device. I tested all three modes against tricky inputs: mixed CRLF and lone \r, PDF text with hard-wrapped lines, indented code with tab runs, and documents separated by multiple blank lines. Normalization held up and the before/after counts stayed accurate, with the result instant on multi-page paste.
Frequently asked questions
Is this remove line breaks tool free?
Yes. The tool is 100% free with no signup and no usage cap. The cleaned text is yours to use in personal and commercial work.
Does my text get uploaded anywhere?
No. Every line break is stripped in your browser with JavaScript, so nothing is sent to a server. The tool works offline once the page loads.
What is the difference between the three strip modes?
Replace with a space swaps each break for one space. Remove entirely joins lines with nothing. Keep paragraph breaks collapses single newlines to a space but preserves blank-line gaps between paragraphs.
Does it handle Windows, Mac, and Unix line endings?
Yes. It normalizes Windows CRLF, Unix LF, and classic Mac CR to a single newline first, so mixed-source text cleans up consistently with no leftover blank lines or stray characters.
Can I also remove the extra spaces left behind?
Yes. Turn on Collapse multiple spaces into one to squash runs of spaces or tabs, then add Trim to clean the start and end. Pair it with our find and replace tool for finer control.
Related text & formatting tools
Swap terms or characters across your cleaned text
Text SorterAlphabetize or dedupe lines before joining them
Word CounterCount words, characters & lines in your text
Case ConverterRecase your flowing text to title or sentence case
URL Slug GeneratorTurn a joined title into a clean kebab-case slug
Lorem Ipsum GeneratorCreate placeholder filler text for layouts
Markdown EditorWrite and preview Markdown live
All ToolsBrowse the full Toolk hub
Guide: Text Tools for CreatorsRead the text-processing workflow guide
Last updated: June 2, 2026 · Runs 100% in your browser — no uploads, nothing leaves your device.
Need a different tool?
Browse all 89 free, in-browser tools — or tell us what we should build next.