List to Comma Separated

Join the lines of a list into one line, separated by commas or any separator you choose.

Tip: press Ctrl + Enter to run.

About the List to Comma Separated

Spreadsheet columns and lists usually have one item per line, but code, SQL queries, tag fields and email “To” boxes often need items on one line separated by commas. This converter joins your lines with the separator you choose and skips blank lines.

Each item is trimmed. Tick the quoting option to wrap every item in double quotes, with any quotes inside the item doubled, which follows the CSV standard and is useful for SQL IN (…) lists and array literals.

How to use it

  1. Paste your list, one item per line.
  2. Set the separator and quoting option.
  3. Click Convert List and copy the result.

Example

Input
London
Paris

New York
Tokyo
Result
"London", "Paris", "New York", "Tokyo"

When to use it

  • Building SQL IN (…) clauses.
  • Pasting spreadsheet columns into tag or keyword fields.
  • Creating arrays for code.
  • Preparing recipient lists for email.

Frequently asked questions

Can I use a separator other than a comma?

Yes. Type any separator, such as “; ”, “ | ” or a single space.

Are empty lines included?

No. Blank lines are skipped.

How do I convert back?

Use Comma Separated to List.

Is the text I enter kept private?

Yes. The List to Comma Separated runs entirely in your web browser, so your text is never uploaded to or stored on our servers. Like most free websites, TextForge shows ads from Google, which may use cookies. See our Privacy Policy for details.