Skip to content
Column to Comma,
More free tools

Newline to comma: join lines into one comma separated line

Paste any text with one item per line, such as emails, tags or names. Every line break becomes a comma, and the result is one line.

Direction
Quick:
Options

Options

Your text never leaves your browser. Read how we handle data.

Example

This input:

ana@example.com
ben@example.com

cara@example.com  

gives this output with the settings on this page:

ana@example.com,ben@example.com,cara@example.com

Replace line breaks with commas

A line break is not always easy to find and replace. In many editors you must turn on regular expressions and type \n. Here, you paste the text and read the result. Windows (CRLF), Mac and Linux line breaks all work.

Trailing spaces and empty lines are removed, so you do not get a comma at the end or two commas in a row.

Not only for spreadsheets

The text can come from anywhere: a terminal, a log file, an email, a chat or a web page. Any text with one item per line works. If the text has no line breaks, nothing needs to change.

Other things to try

  • Pick Comma + space for a list that reads well to people.
  • Pick Semicolon for mail tools that separate addresses with semicolons.
  • Pick Pipe or Tab for other programs.
  • Switch to List to column to go the other way.

Questions about this page

How do I keep a space after each comma?

Open the Separator menu and choose Comma + space.

How do I replace a line break with a different character?

Choose Custom in the Separator menu and type the text you want between lines. Use \t for a tab.

Does it keep blank lines?

By default, no. Untick Remove blank lines in Options if you want empty items kept.

More conversions

More free tools from Bingemind