Skip to content
ToolPlankDEV
Text Tools
100% In-Browser Execution

Updated:

Convert Column to Comma Separated List

Convert column to comma separated list in your browser. Paste cells from Excel or one item per line, choose the separator, add quotes or brackets for SQL and code, and copy the result. It also turns a list back into a column.

Options:

Your list

Input
0 chars Ā· 0 lines

Converted list

Ready
Processing in browser...
0 chars Ā· 0 linesUpdates as you type

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use Column to Comma Separated List

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your column

    Copy a column from Excel or Google Sheets, or type one item per line, and paste it into the Your list box. Press Example to load a short list. You can also drop a .txt or .csv file onto the box.

  2. 02

    Choose the separator, quotes and brackets

    Separator sets what goes between the items. Quotes wraps every item in single, double or backtick quotes. Brackets puts round, square or curly brackets around the whole list.

  3. 03

    Tidy the list

    Trim spaces, Skip empty items and Remove duplicates clean the list while it is converted. Items per line starts a new line after every 5, 10, 20, 50 or 100 items.

  4. 04

    Copy the result, or go back

    The converted list updates as you type. Press Copy, or Download to save it. To turn a list back into a column, set Convert to List to column and paste the list.

How to Convert a Column to a Comma Separated List

To convert a column to a comma separated list, paste the column into the box. Each line becomes one item, and the items are joined with a comma and a space. This is the Example list with the default settings:

Text
apple
banana
cherry
banana
date

→  apple, banana, cherry, banana, date

A column copied from Excel or Google Sheets arrives as one cell per line, so you can paste it straight in. Blank cells are skipped by default, and spaces at the ends of each cell are trimmed. The conversion happens as you type, with no button to press.

Quotes and Brackets for SQL, Python and JavaScript

A list of IDs or names often has to go into code. Set Quotes to Single and Brackets to ( ), and use the plain comma as separator. The same three items become an SQL IN list:

sql
('apple','banana','cherry')

Square brackets with double quotes give you a list that Python and JavaScript both accept. Curly brackets suit sets and templates. Numbers need no quotes, so leave Quotes on None for a list of IDs.

When an item contains the quote character, the tool doubles it. An item written as it's becomes 'it''s' with single quotes, which is how SQL and CSV write it. This is not the same as the backslash escaping that JSON and most programming languages use. If you need JSON string escaping, use JSON Escape on the result or on each item.

Put Several Items on Each Line

A list with a thousand items on one line is hard to read and some tools reject very long lines. Items per line starts a new line after every 5, 10, 20, 50 or 100 items. Each line except the last ends with the separator, without a trailing space, so the list stays valid when you paste the lines together. With 2 items per line and five items, you get:

Text
1, 2,
3, 4,
5

If you want the line breaks gone altogether, Remove Line Breaks joins lines with any separator and can keep paragraphs.

Clean the List While You Convert It

  • Trim spaces: removes spaces and tabs at the start and end of each item, so apple and apple are the same.
  • Skip empty items: leaves out blank lines. Turn it off if empty items matter, for example to keep the position of every row. An empty item is then written as nothing between two separators, or as an empty pair of quotes.
  • Remove duplicates: keeps the first copy of each item. Comparison is exact, so Apple and apple stay separate. For a longer list that you want to deduplicate with more control, use Remove Duplicate Lines first.

Convert a Comma Separated List to a Column

Set Convert to List to column and paste the list. The tool splits it on the separator you chose and writes one item per line, ready to paste into a spreadsheet column. It understands what the other direction produces:

  • Brackets around the whole list are removed when they match, as in ( ), [ ] and { }.
  • Quotes around an item are removed, and doubled quotes inside it are turned back into one.
  • A separator inside quotes does not split the item, so "Smith, John" stays one item.
  • An apostrophe in the middle of an unquoted word, as in don't, is left alone.

Line breaks in the pasted list are treated as ordinary spaces around the items, so a list that was split over several lines converts correctly. Set the same separator that the list uses. For a list that uses a comma and a space, the Comma and space choice splits on the comma and trims the space.

Other Separators: Semicolon, Pipe, Tab and Space

Not every program uses a comma. Many European spreadsheet exports use a semicolon. Some data files use a pipe, and pasting tab separated items into a single spreadsheet row needs a tab. The Separator menu covers these. A single space separates a list of words or tags.

To change the capital letters of items first, the Excel Case Converter works on a whole column or file.

Limits and Things to Know

  • Input is limited to 2,000,000 characters.
  • The tool does not parse full CSV files with several columns. It treats the whole input as one list, one item per line (or one list on a line when reversing).
  • Quote doubling follows SQL and CSV. It is not JSON or programming-language escaping.
  • Spreadsheet cells that contain line breaks inside a cell are split into separate items, because each line is an item.

Your list is converted by code running in your browser. It is not sent to a server and not stored. See the Privacy Policy for details.

Frequently Asked Questions

Technical Q&A for Column to Comma Separated List

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the column into the box, one item per line. The list appears on the right as a single line with commas between the items. Press Copy to use it.

Select the cells in Excel, copy them and paste them into the box. Each cell becomes one item. Then copy the result back to wherever you need it.

Choose Single or Double under Quotes. Every item is wrapped in that quote, so apple, banana becomes 'apple', 'banana'.

Set Quotes to Single for text or None for numbers, set Brackets to ( ), and set Separator to Comma. Paste the column, and copy the result into your IN clause.

Set Convert to List to column, choose the separator the list uses and paste it. Each item is written on its own line.

Yes. Items per line starts a new line after 5, 10, 20, 50 or 100 items. Every line except the last ends with the separator, without a trailing space.

Empty lines are skipped by default. Remove duplicates is optional and keeps the first copy of each item. Both can be switched on or off.

When you convert a column to a list, an item with a comma inside is kept as it is, so wrap items in quotes if the list will be read by another program. When you convert a list to a column, a comma inside quotes does not split the item.

Yes. The Separator menu offers comma, comma and space, semicolon, pipe, tab and space, in both directions.

No. The list is converted in your browser and nothing is sent to a server or saved. Reloading the page clears it.