Text tool

Separate any list with commas

Paste a column from Excel, a list of emails or anything one-per-line, and get clean comma separated values instantly. Add quotes, build an SQL IN list or JSON array, remove duplicates, or turn commas back into a list.

Instant, as you type SQL & JSON ready Dedupe & sort Nothing uploaded
Output

Your list

0 lines 0 characters

Result

0 items 0 characters
Options
1Read the input
2Clean up
3Build the output
Guide

How to separate a list with commas

Comma separated values are the easiest way to move a list between programs: into an email's To field, a search filter, a spreadsheet, a database query or a line of code. This tool does the tidy-up work for you, so there are no stray spaces, blank lines or repeated values.

Excel or Google Sheets column to comma list

  1. Select the cells in the column and press Ctrl + C (Cmd + C on Mac).
  2. Paste them into Your list. Each cell becomes one item and empty cells are skipped.
  3. Pick a format above the boxes, such as Comma + space or SQL IN.
  4. Press Copy and paste the result where you need it.

Have a whole CSV file?

Press Open file and choose a .csv or .txt file. If it has several columns, pick the one you want, for example only the email column, and skip the header row. The file is read in your browser and never uploaded.

Formats you can make

ButtonResultGood for
Comma + spaceLahore, KarachiEmails, tags, text
Comma onlyLahore,KarachiCSV, URLs, settings
Single quotes'Lahore', 'Karachi'Code and scripts
SQL IN('Lahore', 'Karachi', 42)WHERE … IN queries
JSON array["Lahore", "Karachi"]JavaScript, APIs
One per lineLahore↵KarachiUndoing a comma list

Example: an SQL query

-- paste customer IDs, press SQL IN, then:
SELECT * FROM orders
WHERE customer_id IN (1024, 1031, 1187);
FAQ

Frequently asked questions

How do I convert a column in Excel to a comma separated list?

Select the cells in the column and copy them (Ctrl + C). Paste them into the input box on this page. The comma separated list appears on the right straight away. Press Copy and paste it wherever you need it.

How do I add quotes around each item?

Press the 'Single quotes' or "Double quotes" button above the boxes, or choose a quote style under Wrap each item in the options. Quotes that are already inside an item are escaped correctly.

Can I make a list for an SQL IN query?

Yes. Press SQL IN ( ). Each value is put in single quotes, numbers are left unquoted and the whole list is wrapped in brackets, for example ('Lahore', 'Karachi', 42). Add WHERE city IN in front of it.

How do I turn a comma separated list back into one item per line?

Press One per line, then paste your comma separated text. The tool also removes the quotes and brackets around items, so a JSON array or SQL list becomes a clean list.

What happens if an item already contains a comma?

The item is put in double quotes, for example "Peshawar, KPK". This is the CSV standard, so Excel and other programs still read it as one value. You can turn this off in the options.

Is my data uploaded anywhere?

No. The conversion runs in your browser, even when you open a CSV file, so you can safely use it for email lists, customer IDs and other private data.