Skip to content
UniKit

Join lines into one line

Join multi-line text into one line with a separator of your choice: CRLF/LF/CR supported, optional per-line trim and empty-line removal, all local.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Multi-line text

Single-line result

CRLF / LF / CR are all recognised; the text is only joined, never rewritten.

Enter multi-line text to see the single-line result.

What this tool does

  • Flatten a column copied out of a spreadsheet into one line for a field that only accepts single-line input
  • Squeeze a multi-line log excerpt into one line for a chat message or ticket
  • Use a comma separator to turn a column of keywords into a comma-separated argument list, dropping empty lines on the way

Example

Input

first line
second line
third line

Output

first line second line third line

The real result with the default options (a one-space separator, both switches off): 3 input lines → 3 joined, 2 line breaks replaced. Apart from the newlines becoming separators every character is preserved, and the stats row on the page repeats the same numbers.

Frequently asked questions

What happens to empty lines?

They are kept by default: `a\n\nb` becomes `a b` (two consecutive separators), because there really is an empty line in between. Turn on “Drop empty lines” to get `a b`; the “joined” count then drops from 3 to 2. Both behaviours are reported in the stats instead of being guessed.

What does “Trim each line” do?

It trims leading and trailing spaces, tabs and full-width spaces from every line before joining. Text copied from web pages or spreadsheets often carries indentation, which would otherwise show up as a run of spaces; inner spacing is untouched.

Does it change punctuation, case or encoding?

No. The tool only replaces line breaks (CRLF / LF / CR are all recognised) and joins the pieces. Punctuation, case, half/full-width forms and Unicode characters are preserved byte for byte. It also performs no HTML escaping — use “Newlines to br” with escaping enabled when you need that.

Is the text uploaded?

No. The conversion happens entirely in your browser with no network request; closing the page discards it.

Keywords:join lines

Related tools