PrivateCSV

Convert a column to a comma-separated list

Turn an Excel column into a comma-separated list, or back.

The result updates as you type. Nothing leaves your browser.

Options

  • Nothing is uploaded
  • Free · no account
  • Tested on 400k-row files

Reference

Column to Comma List: how it works

The tool is above. Below: a short overview, optional step-by-step detail, honest browser limits, and answers to common questions.

Last updated 3 min read

About this tool

PrivateCSV turns a column of values, pasted from Excel, Google Sheets or any text, into a comma-separated list such as a, b, c, and turns a list back into one value per line. Choose the separator, wrap values in single quotes for a SQL IN clause or double quotes for a JSON array, remove duplicates and empty lines, and sort. The result updates as you type and nothing is sent anywhere: it all runs in your browser.

How to check that your file is never uploaded

Read the step-by-step guideHow-to, example and use cases (~3 min)

How to convert a column to a comma-separated list

  1. In Excel or Google Sheets, select the cells of the column and copy them (Ctrl+C or Cmd+C).
  2. Paste them in the Column box above. The comma-separated list appears on the right as you paste.
  3. Pick the separator and, if needed, quotes, brackets, duplicate removal or sorting in the options.
  4. Click Copy and paste the list where you need it. Use “List → column” for the reverse.

Example

A column pasted from Excel as a quoted SQL IN list, duplicates removed.

column
1001
1002
1003
1002
O'Brien
list
('1001', '1002', '1003', 'O''Brien')

When you need it

SQL queries
Paste a column of customer IDs or emails and get ('a', 'b', 'c') ready for WHERE id IN (...). Single quotes inside values are doubled, as SQL requires, and long lists can be split every 1,000 values for Oracle.
Emails, tags and search filters
Turn a column of addresses into a list for the To field of an email, a column of keywords into tags, or SKUs into a filter for a store admin.
Code and JSON
Wrap values in double quotes and brackets to get a JSON array or a list for Python, JavaScript or a config file.

Both directions

Column → list joins one value per line with the separator you choose: comma and space, comma, semicolon, space, pipe, tab or any text. List → column splits a list on commas, semicolons, tabs, pipes, spaces or line breaks, detected automatically, and can remove the quotes around values and the parentheses or brackets around the list, so a SQL IN clause or JSON array turns back into a clean column to paste into a spreadsheet.

Switching direction moves the current result to the input, so you can convert back and forth in one click.

Cleaning the values

Spaces around values and empty lines are removed by default, as Excel often adds a trailing line break when copying. Duplicates can be removed, with or without ignoring case, and values can be sorted A to Z or Z to A in natural order, so item2 comes before item10.

Browser and file limits (not a trial)

These are technical limits of running in your browser—device memory, encoding and what this tool does not do. They are not a free trial, account quota or paid plan. There is no subscription.

  • Values are taken one per line: copy a single column. Cells copied from several columns arrive separated by tabs on the same line.
  • Very large pastes (hundreds of thousands of lines) can slow the page down while typing.

Frequently asked questions

How do I convert a column to a comma-separated list?

Copy the column in Excel or Google Sheets and paste it in the Column box above: the comma-separated list appears at once. Choose another separator or quotes in the options, then click Copy.

How do I convert an Excel column to a comma-separated list with a formula?

In Excel 2019 and Microsoft 365, =TEXTJOIN(", ", TRUE, A2:A100) joins a range with commas and skips empty cells. In Google Sheets, =JOIN(", ", A2:A100) or TEXTJOIN work too. This tool does the same without a formula and adds quoting, deduplication and sorting.

How do I add quotes around each value for a SQL IN clause?

Set Quotes to single quotes and Wrap in to ( ). You get ('a', 'b', 'c'), with any apostrophe inside a value doubled, ready for WHERE column IN (...).

How do I turn a comma-separated list into a column?

Choose List → column and paste the list. Each value goes on its own line, ready to paste into Excel or Google Sheets. Quotes and brackets are removed if you keep that option ticked.

Can I remove duplicates from a list?

Yes. Tick Remove duplicates, and Ignore case if Apple and apple should count as the same value. The result says how many duplicates were removed.

Related tools

Go further

Your files never leave your device

PrivateCSV runs this tool in your browser. No upload, no account, no trial and nothing to install.