Remove Line Breaks

Join wrapped lines into one block while keeping paragraph breaks

Runs entirely in your browser. Your data never leaves this device.

Input
Output

How to use it

  1. Paste your text into the input panel.
  2. Choose what to join lines with: a space, nothing at all, or a comma.
  3. Leave Keep paragraphs on if blank lines in your text mark real paragraph boundaries.

The problem this actually solves

Text copied out of a PDF, an email client, or a terminal arrives with a line break at the end of every visual line. Those breaks were never part of the content — they were the renderer's decision about where the column ended. Paste that text somewhere with a different width and it looks broken:

Base64 is an encoding,
not encryption. Anyone can
decode it without a key.

You want one flowing paragraph. But a naive find-and-replace of every newline destroys the structure that does matter: the blank lines between paragraphs. That is what Keep paragraphs exists for. It splits the text on blank lines first, joins within each block, and puts the paragraph breaks back.

Line endings, briefly

Three conventions are still in circulation. Unix and macOS use a single LF (\n). Windows uses CRLF (\r\n). Classic Mac OS, up to version 9, used a lone CR (\r).

This matters because a tool that only looks for \n will leave a stray \r at the end of every line when fed Windows text. The result looks correct in most editors and then breaks something downstream — a string comparison that fails for no visible reason, a CSV column with an invisible character, a shell script that reports command not found on a command that is plainly there. This tool normalises all three to LF before doing anything else.

Turning a column into a list

A specific use worth knowing: copy a column of IDs from a spreadsheet, paste it here, choose Comma as the joiner, and you get 1001, 1002, 1003 ready for a SQL IN clause or a config array. It takes a second and avoids the usual manual editing.

The same trick works in reverse for reading: take a long comma-separated line, and any tool that splits on the delimiter gives you back one item per line.

What this tool deliberately does not touch

Non-breaking spaces and zero-width characters survive. They are a frequent source of confusion — a copied non-breaking space looks exactly like a space but fails an equality check — but they are not line breaks. Removing them here would be a silent, unrequested change to your text, and silent changes are worse than a second pass through a dedicated whitespace tool.

Frequently asked questions

What does Keep paragraphs do?

It treats a blank line as a real paragraph break and only joins the lines within each paragraph. This is what you want for text copied from a PDF, where every visual line ends in a break but paragraphs are separated by blank lines.

What is the difference between CR, LF and CRLF?

LF (`\n`) is the Unix line ending, CRLF (`\r\n`) the Windows one, and bare CR the classic Mac one. This tool normalises all three first, so Windows text does not end up with doubled breaks or stray characters.

Why are there still double spaces in my output?

Joining lines that already ended with a space produces two spaces. Enable Collapse extra spaces to reduce every run of spaces to one.

Can I join lines with a comma instead?

Yes — pick Comma as the joiner. This is the quickest way to turn a column of values copied from a spreadsheet into a comma-separated list for a SQL IN clause.

Will this remove invisible characters too?

It removes line breaks and, optionally, extra spaces. Non-breaking spaces (U+00A0) and zero-width characters are left alone — they are not line breaks, and removing them silently would change your text in ways you did not ask for.

Related tools

browse category →

Last updated: