Comma Separator

Turn a column into a comma-separated list, or a list back into a column.

Runs in your browser. Nothing you enter is uploaded.

Convert

How to use Comma Separator

  1. Paste a column, one item per line, such as a column copied from Excel or Google Sheets.
  2. Leave Column to comma list selected to get "a, b, c", or choose Comma list to column to put each item of a list on its own line.
  3. Under Options, pick the separator, add quotes for SQL, wrap the list in ( ) or [ ], or remove duplicates.
  4. Copy the result, or download it as a .txt file.

Examples

A column turned into a list

Settings
  • Convert: Column to comma list
Input
Paris
London
Berlin
Madrid
Rome
Result
Paris, London, Berlin, Madrid, Rome

Each line becomes one item.

A list for an SQL IN clause

Settings
  • Convert: Column to comma list
  • Separator: Comma
  • Quotes: Single 'a'
  • Wrap in: ( )
  • Remove duplicates: On
Input
ana@example.com
ben@example.com

chloe@example.com
ben@example.com
Result
('ana@example.com','ben@example.com','chloe@example.com')

Ready to paste after WHERE email IN. The empty line and the second ben@example.com are left out.

A list split back into a column

Settings
  • Convert: Comma list to column
  • Remove quotes around items: On
Input
red, green, "blue, light", yellow
Result
red
green
blue, light
yellow

The quoted item keeps its comma, and its quotes are removed.

How it works

Column to comma list reads one item per line and joins the items into one line. Comma list to column does the reverse: it splits a list at its commas and puts each item on its own line.

Your text Choose Result
red, green and blue on three lines Column to comma list red, green, blue
red, green, blue Comma list to column red, green and blue on three lines

Under Options you can change the separator to a plain comma, a semicolon, a pipe, a tab, a space or your own text. For a column, you can also put each item in single or double quotes and wrap the whole list in ( ) or [ ].

Good to know

  • Spreadsheets: a column copied from Excel or Google Sheets is one item per line. A copied row is cells separated by tabs, and it’s read as a list of items too.
  • Items with commas inside: when splitting, an item in quotes stays whole: “Smith, John” is one item. The quotes are removed unless you turn off Remove quotes around items.
  • Other separators: when a list has no commas but has semicolons, tabs or pipes, it’s split at those, and the tool says so. To split at spaces, choose Space.
  • Quotes inside items are doubled, so O’Brien in single quotes becomes ‘O’‘Brien’, the way SQL and CSV expect it.
  • Empty lines and spaces: blank items are skipped, and spaces at the start and end of each item are removed.
  • Duplicates: Remove duplicates keeps the first copy of each item. Capital letters count, so Apple and apple are different items.

Nothing you paste is uploaded. The tool runs in your browser.

Questions

How do I convert a column to a comma-separated list in Excel?

In Excel 2019 or 365, use =TEXTJOIN(", ",TRUE,A1:A100). TRUE skips empty cells. In Google Sheets, =TEXTJOIN(", ",TRUE,A1:A100) works too. In older Excel, paste the column here instead.

How do I split a comma-separated list into rows in Excel?

In Excel 365, =TEXTSPLIT(A1,,",") puts each item on its own row. In older Excel, use Data → Text to Columns with Comma as the delimiter, then copy the cells and use Paste Special → Transpose. In Google Sheets, use =TRANSPOSE(SPLIT(A1,",")).

How do I make a comma-separated list for SQL?

Paste the column, then under Options set Quotes to Single and Wrap in to ( ). The result looks like ('a','b','c') and goes right after IN. Quotes inside an item are doubled, so O'Brien becomes 'O''Brien'. Oracle allows at most 1,000 items in one IN list.

How do I add quotes around each item in a list?

Choose Column to comma list and set Quotes to Single or Double. If your list is already on one line, first choose Comma list to column, copy the column, and paste it back.

Why are some items split in the wrong place?

An item with a comma inside it, like Smith, John, looks like two items. Put such items in double quotes, "Smith, John", and they stay whole when you split the list. Spreadsheets do the same when they save a CSV file.

Updated October 23, 2026 · Works in current Chrome, Edge, Firefox and Safari · Runs entirely in your browser