Comma Separator: Convert Columns to Delimited Lists
Paste a column from Excel, Google Sheets or a query result and get a comma-separated list, a quoted SQL IN (…) list, a JSON array or a Python list as you type. Switch direction to turn a delimited list back into one item per line, with CSV-style quote handling. Everything runs in your browser; nothing is uploaded.
One item per line, or any delimited list. Windows (CRLF), Mac and Linux line breaks all work. Press Ctrl+Enter (Cmd+Enter on a Mac) to copy the output.
Paste a column or list to begin.
- Items in
- 0
- Empty removed
- 0
- Duplicates removed
- 0
- Items out
- 0
- Groups
- 0
- Split on
- –
How it works and limits
- Order of steps: split, trim, remove empty items, dedupe (the first occurrence is kept), sort, add prefix and suffix, quote and escape, split into groups, join, then wrap.
- Auto-detect picks new line when the input has more than one line. On a single line it picks whichever of tab, comma, semicolon or pipe appears most often outside quotes, then spaces. One trailing line break, as Excel adds when you copy cells, is ignored.
- Quote-aware splitting follows RFC 4180: a quote only opens at the start of an item,
""inside quotes is a literal quote, and text after a closing quote is kept but flagged. An unclosed quote is read as plain text and flagged. Regular-expression mode splits on every match and ignores quotes. - Multi-column pastes from a spreadsheet keep each row as one item containing tabs. To split every cell, choose Tab, or choose Custom with the regular expression
[\t\n]. - Sorting uses your browser’s locale collation; natural sort compares digit runs as numbers. Ignore-case dedupe compares lower-cased text and does not apply Unicode normalization.
- SQL escaping doubles single quotes, which is standard SQL. MySQL and MariaDB also treat backslashes as escapes by default, which this tool does not double. Use literal lists for ad hoc queries; application code should use parameterized queries.
- Groups are placed one per line, with a blank line between groups when items are separated by new lines. Join SQL groups yourself with
OR column IN (…). - Python and JavaScript presets both use single quotes with backslash escapes, a valid string literal in either language. The JSON preset uses double quotes and JSON escapes.
- A complex regular expression can be slow on very large input because it runs on your own device.