How to use
Paste your list
Paste a column copied from a spreadsheet into Your list, open a .txt or .csv file, or press Try sample to load a short SKU column with a blank line and a repeat.
Pick the output format
Click a preset such as SQL IN or JSON, or choose Join items with, Quote each item and Wrap the whole list yourself. Tick Remove duplicates or pick a Sort order if needed.
Copy the list
The counter shows how many items were found and which separator was detected. Press Copy, Download .txt, or Use result as input to convert it again.
Why Comma Separator
- Turns a column into a comma-separated list, or a list back into a column.
- Quotes and brackets for SQL IN lists, JSON arrays and CSV rows.
- Trims, drops blanks, removes duplicates and sorts in the same step.
- Detects the separator you pasted, and runs in your browser.
Preset examples
Each preset applied to the three values red, green and blue.
| Preset | Result |
|---|---|
| a, b, c | red, green, blue |
| SQL IN ('a','b') | ('red','green','blue') |
| JSON ["a","b"] | ["red","green","blue"] |
| CSV row | "red","green","blue" |
| Back to a column | red, green and blue on three lines |
Doing it in Excel or Google Sheets
Spreadsheets can join a column too. In Excel 365 and Google Sheets, =TEXTJOIN(", ",TRUE,A2:A100) joins a range with a comma and a space and skips empty cells. To add quotes, use =TEXTJOIN(",",TRUE,"'"&A2:A100&"'"), entered as an array formula in older versions. To split a comma list into cells, use Data, Split text to columns in Sheets or Data, Text to Columns in Excel.