Column to Comma Separated List Converter

Turn a column from Excel into a comma-separated list - or split a comma-separated string into lines. Add quotes, change delimiters, clean up. Private - runs in your browser.
ListFerret mascot

Input

Output

0in0out0removed

Options

How to use the column to comma separated list converter tool

  1. Paste your data. Copy a column from Excel or Google Sheets (one item per line) or paste a comma-separated string.
  2. Set the input and output separators. For a column → comma list keep input as “New line” and output as “Comma + space”. For the reverse, choose Comma as the input and New line as the output.
  3. Add quotes or other wrappers. Wrap each item in double or single quotes for SQL, Python, JavaScript or JSON lists, and optionally add a prefix or suffix.
  4. Copy the result. Paste it straight into your query, code or email client.

Common uses

A worked example

A column of five made-up names, with one repeated:

Ava
Ben
Cleo
Dev
Ben

With “Remove duplicates”, a comma separator and single quotes around each item, the result is 'Ava','Ben','Cleo','Dev': five rows in, four items out. Add the option to wrap the whole list in parentheses and it is ready for an SQL IN clause. The full guide to converting a column to a comma separated list covers Excel, Google Sheets and SQL in depth.

What the options are for

OptionWhy it exists
Input and output separatorsColumn to comma list, comma list to column, or any other pair: semicolon, pipe, tab, space or custom
Wrap each itemText values need quotes in SQL, JSON and most code
Escape quotes inside itemsA name like O’Brien breaks 'O'Brien'. Doubling the quote gives 'O''Brien' (SQL and CSV); a backslash gives 'O\'Brien' (code)
Wrap the whole listPut the list inside ( ) for SQL, [ ] for arrays and JSON, or { }
Split into groups of NSome databases limit an IN list (Oracle has historically allowed 1,000 expressions). Groups are separated by a blank line
Remove duplicates, trim, remove emptyKeeps the list short and avoids stray spaces and empty items

Common mistakes

Frequently asked questions

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

Paste the column into the input, keep “Input is separated by” on New line, and choose Comma (or Comma + space) as the output separator.

How do I convert a comma-separated list into separate lines?

Set the input separator to Comma and the output separator to New line.

How do I build a list for an SQL IN clause?

Wrap each item in single quotes, use Comma as the output separator, and add parentheses around the result. Use Remove duplicates to keep the list short.

Can it handle several different delimiters at once?

Yes. Choose “Auto” as the input separator to split on commas, semicolons, tabs, pipes and line breaks together.

Does it remove blank lines and extra spaces?

Yes. “Remove empty items” and “Trim whitespace” are on by default.

Is my data sent anywhere?

No. The conversion happens in your browser only.

More tools: Email Extractor · Compare Lists · Remove Duplicates · Sort Lines · List Converter

Related guides

Share this page: XFacebookLinkedInRedditEmail