usefmtly

Remove Line Breaks

Free online tool to remove line breaks from text. Replace newlines with a space, nothing, or a custom separator. Collapse multiple spaces. Instant, client-side, no signup.

0Input chars
0Output chars
0Line breaks
SpaceMode
Input
Output

How to remove line breaks

  1. Paste your text into the input box on the left. Line breaks are processed instantly as you type or paste.
  2. Choose a replacement modeSpace joins lines with a space (creating a single paragraph), Nothing removes the line break entirely (concatenating words), or Custom lets you specify a separator like | or , .
  3. Toggle Collapse spaces if you want multiple consecutive spaces reduced to one — useful when text already had trailing spaces before the line break.
  4. Copy the output using the copy button at the top right of the output panel.

When to use this tool

Pasting into single-line inputs

Many forms, spreadsheet cells, and search fields reject multi-line text. Strip line breaks to make the text compatible.

Cleaning up PDF copies

Text copied from PDFs often includes hard line breaks at every wrapped line. Remove them to get flowing paragraphs.

Joining list items into a sentence

Convert a newline-separated list into a comma-separated sentence with the custom separator option.

Preparing text for APIs

Some APIs and JSON strings need single-line values. Remove line breaks before encoding your content.

Email subject line cleanup

Copied subject lines from PDFs or documents may include unwanted breaks. Clean them in one click.

Concatenating code strings

Turn multi-line SQL, markdown, or template text into a single quoted string for programmatic use.

What are line breaks?

A line break (also called a newline) is the invisible character that moves text to the next line. When you press Enter in a text editor, you insert a line break.

There are two common formats: LF (Line Feed, \n) used on Unix/Linux/macOS, and CRLF (Carriage Return + Line Feed, \r\n) used on Windows. This tool handles both automatically.

Related tools: Text Cleaner for broader text cleanup, Duplicate Line Remover to deduplicate lists, or the Word Counter to count words in your result.

Frequently Asked Questions

What does this tool do?

It removes or replaces all line breaks (newlines) in your text. You can replace them with a space (joining lines into a single paragraph), remove them entirely, or use a custom separator like " | " or ", ".

What kinds of line breaks does it handle?

Both Unix line endings (LF, \n) and Windows line endings (CRLF, \r\n) are handled correctly.

When would I need to remove line breaks?

Common use cases: pasting text into a form that doesn't accept line breaks, preparing text for a single-line input, cleaning up copied text from PDFs, joining a list of items into a sentence.

Related Tools