Column to Comma Separated List

Join one-per-line values into a single delimited line, with presets for SQL, JSON and Python.

Presets:
0 lines
0 items
Separator
Wrap each item
Wrap whole list
Clean up
Transform

How to use this converter

  1. 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.
  2. Pick an output shape. Use the preset chips for the common cases, or set the separator and wrappers by hand in the options panel.
  3. Tidy the list if you need to. Remove duplicates, sort A–Z or numerically, change the letter case, or reverse the order.
  4. 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:

PresetOutputTypical use
Plainapple, banana, cherrySentences, emails, tags fields
No spacesapple,banana,cherryCSV 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
Semicolonapple; banana; cherryOutlook / Exchange recipient lists
Pipeapple | banana | cherryMarkdown 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 ", "   # PowerShell

Tips for clean results

Column to Comma Separated List FAQ

Is my data uploaded anywhere?

No. The conversion runs entirely in your browser with JavaScript. Nothing you paste is sent to a server, stored, or logged. You can disconnect from the internet after the page loads and it will keep working.

How do I put quotes around each value?

Type a quote character into both the Before and After boxes under “Wrap each item”, or click the SQL IN, JSON array or Python list preset, which fills those boxes for you.

Can I use a separator other than a comma?

Yes. The separator menu includes semicolon, pipe, space, tab and new line. Pick Custom… to type anything else, such as -- or :: .

Why does the item count say some lines were dropped?

Blank lines are skipped by default, and duplicates are removed when that option is ticked. The counter tells you how many lines did not make it into the output so nothing disappears silently. Untick “Skip blank lines” to keep them.

Does it work with data copied from Excel or Google Sheets?

Yes. Select a column in your spreadsheet, copy it, and paste here. Each cell becomes one line, which is exactly what the converter expects. Trailing spaces from cells are trimmed automatically.

How do I go the other way — from a comma list back into a column?

Use the companion comma separated list to column tool, or click Split back to column under the result box, which opens that tool with your list already loaded.