How to use this converter
- Paste your column. It can come from Excel, Google Sheets, a SQL query result, a log file or any text editor. Each line is treated as one item.
- Pick an output shape. Use the preset chips for the common cases, or set the separator and wrappers by hand in the options panel.
- Tidy the list if you need to. Remove duplicates, sort A–Z or numerically, change the letter case, or reverse the order.
- Copy or download. The result box updates instantly; press Ctrl+Enter in the input box to copy without reaching for the mouse.
What the presets produce
Starting from the three-line column apple, banana, cherry, each preset gives you a different, ready-to-paste result:
| Preset | Output | Typical use |
|---|---|---|
| Plain | apple, banana, cherry | Sentences, emails, tags fields |
| No spaces | apple,banana,cherry | CSV cells, URL query strings |
| SQL IN | ('apple', 'banana', 'cherry') | WHERE id IN (…) clauses |
| JSON array | ["apple", "banana", "cherry"] | API payloads, config files |
| Python list | ['apple', 'banana', 'cherry'] | Scripts and notebooks |
| Semicolon | apple; banana; cherry | Outlook / Exchange recipient lists |
| Pipe | apple | banana | cherry | Markdown tables, log filters |
| Regex OR | (apple|banana|cherry) | Alternation patterns in search tools |
Common situations where this saves time
Building a SQL IN clause
You have a column of IDs from a report and need to query those exact rows. Paste the IDs, click SQL IN, and drop the result straight after WHERE id IN. For numeric IDs you may prefer no quotes at all — use the Plainpreset and wrap the whole list in parentheses:
SELECT * FROM orders WHERE customer_id IN (1042, 1043, 1044);Addressing an email to a list of people
Most mail clients accept addresses separated by commas; Outlook traditionally expects semicolons. Paste the address column, choose the matching preset, and paste the result into the To or BCC field. Tick Remove duplicates first so nobody receives the message twice.
Turning spreadsheet rows into code
Product SKUs, country codes, feature flags — data often starts life in a spreadsheet and needs to end up in an array. TheJSON array and Python list presets add the right quotes and brackets so the result parses on the first try.
Doing the same job in a spreadsheet or in code
Excel and Google Sheets
The TEXTJOIN function joins a range with a separator and can skip blank cells:
=TEXTJOIN(", ", TRUE, A1:A100)To add quotes around every value, wrap the range in a text expression first:
=TEXTJOIN(", ", TRUE, "'" & A1:A100 & "'")Python
lines = [l.strip() for l in text.splitlines() if l.strip()]
result = ", ".join(lines)Command line
paste -sd, column.txt # Linux / macOS
(Get-Content column.txt) -join ", " # PowerShellTips for clean results
- Watch the item counter. If it shows fewer items than lines, blank or duplicate lines were removed — expected, but worth a glance.
- Sorting is number-aware. A–Z ordering puts
item2beforeitem10, unlike a plain character sort. - Values containing commas should be quoted before they go into a CSV file, otherwise a downstream parser will split them.
- Round-trip with one click. Split back to column sends the result to the reverse tool for further cleanup.