Skip to main content
ToolsHub

Remove Line Breaks

Clean up copied text by removing unwanted line breaks. Optionally keep paragraph spacing, replace breaks with spaces, and collapse extra whitespace.

Updated

Files never leave your browser

No output yet

Paste text with line breaks on the left to see the cleaned-up result here.

How to use Remove Line Breaks

Remove unwanted line breaks from copied text, pasted emails, or exported documents entirely in your browser — no data is sent to any server. Whether you're cleaning up text pasted from a PDF, an email client, or a word processor, this tool strips or replaces line breaks in one click. You can remove all breaks, preserve paragraph spacing, or replace each break with a space for seamless inline text.

  1. Paste your text — with line breaks — into the input area.
  2. Choose a mode: "Remove all line breaks", "Keep paragraph breaks" (blank-line-separated blocks), or "Replace with space".
  3. Optionally enable "Collapse multiple spaces" to clean up double-spaces left after removal.
  4. Click "Remove Line Breaks" and the cleaned text appears instantly.
  5. Copy the output or download it as a plain text file.

Your data never leaves your device — 100% private processing.

Line ending types: LF, CRLF, and CR

Three different byte sequences signal a new line across operating systems. Unix, Linux, and modern macOS use a single Line Feed character (LF, \n, hex 0x0A). Windows uses a Carriage Return followed by Line Feed (CRLF, \r\n, hex 0x0D 0x0A). Classic Mac OS — before OS X — used a standalone Carriage Return (CR, \r, hex 0x0D). When text is copied across platforms or exported from applications that do not normalise line endings, documents often contain a mix of all three variants. This tool detects and removes all three regardless of origin.

Line ending type comparison
NameEscapeHex bytesPlatform
LF\n0x0AUnix, Linux, macOS (OS X+)
CRLF\r\n0x0D 0x0AWindows, DOS, HTTP headers, SMTP
CR\r0x0DClassic Mac OS (pre-OS X)

Common sources of unwanted line breaks

PDF text extraction inserts a line break at the end of every visible text line, breaking sentences mid-word when the PDF was created from a reflowed document. Email clients hard-wrap long lines at 72 or 76 characters per RFC 2822, leaving short broken fragments when a message is forwarded or copied into a plain text field. Word processors may export RTF or HTML with forced line breaks that survive copy-paste as raw newline characters. Removing these breaks and re-pasting into the target application ensures the text reflows correctly according to the destination container's width.

Worked examples

Join wrapped lines

Inputs: "line one" + newline + "line two"

Result: "line one line two" (replace break with space)

Keep paragraphs

Inputs: text with blank-line gaps

Result: wrapped lines joined; blank-line breaks kept

Address to one line

Inputs: 3-line postal address

Result: single comma- or space-joined line

Glossary

Line Feed (LF)
A control character (U+000A) that advances the cursor to the next line; the standard line terminator on Unix, Linux, and modern macOS.
Carriage Return (CR)
A control character (U+000D) that moves the cursor to the beginning of the current line; used alone as a line terminator in classic Mac OS.
CRLF
The two-byte sequence CR + LF (0x0D 0x0A) used as the line terminator in Windows, DOS, and Internet text protocols such as HTTP and SMTP.
Hard wrap
The practice of inserting a literal line break at a fixed column width (typically 72–80 characters), common in email and terminal output, as opposed to soft-wrapping at display time.
Paragraph break
A double newline (blank line) that separates paragraphs in plain text, as distinct from a single newline that merely wraps a long line within the same paragraph.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Text Tools

Explore all Text Tools.