CodeKitHub
Text Tools

Remove Line Breaks from Text

Last updated:

Paste multi-line text, pick what should replace each line break — a space, nothing, or a custom separator — and get a single-line result instantly. Runs entirely in your browser.

Replace line breaks with

What Is This Tool?

This tool removes line breaks (newlines / "Enter" characters) from pasted text and joins everything into a single line. It handles all common line-ending formats — Unix (\n), Windows (\r\n), and old Mac (\r) — so text copied from any source works correctly.

You control what fills the gap where each line break used to be: a single space (the usual choice for turning wrapped paragraphs back into flowing text), nothing at all (for directly concatenating fragments), or a custom separator like a comma or pipe character (useful for turning a pasted list into a delimited string).

Why Use It?

  • Handles Windows, Unix, and old Mac line endings correctly.
  • Three replacement choices: space, nothing, or a custom separator.
  • Empty lines are skipped automatically so you don't get doubled separators.
  • Local processing — text never leaves your browser.
  • No sign-up, no character limit, free to use.

How to Use

  1. Paste your multi-line text into the input box.
  2. Choose what should replace each line break: a space, nothing, or a custom separator.
  3. Click Remove Line Breaks.
  4. Copy the single-line result.

Example

Input

Line one
Line two
Line three

Output

Line one Line two Line three

With "A space" selected, each line break is replaced by a single space, so the three lines merge into one continuous line of text.

Common uses

  • Flattening a multi-line address or note into one line for a CSV field.
  • Turning a pasted list into a comma- or pipe-separated string for code or a database query.
  • Joining wrapped paragraph text (copied from a PDF, where every line break is a mid-sentence artifact) back into flowing prose.
  • Preparing text for systems that don't accept literal newline characters in a single input field.

Frequently Asked Questions

Does this work with text copied from Windows or Excel?

Yes. Windows-style line endings (\r\n) are recognized and handled the same as Unix-style (\n) line endings, so pasted spreadsheet or Notepad text works correctly.

What happens to blank lines in the input?

Blank lines are skipped rather than turned into an extra separator, so you don't end up with double spaces or empty entries in a custom-separator list.

Can I use a custom separator like a comma?

Yes — select "Custom separator" and type anything you like (a comma, a pipe |, a semicolon, or multiple characters) into the field next to it.

How is this different from the Text Cleaner tool?

Text Cleaner keeps your text as multiple lines while removing duplicates, blank lines, and extra whitespace within each line. This tool specifically collapses everything into one line — use Text Cleaner first if you also want to dedupe or trim before joining.

Is my text uploaded anywhere?

No. Everything runs as local JavaScript in your browser; nothing is sent to a server.

Related Tools