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:
apple
banana
cherry
banana
date
ā apple, banana, cherry, banana, dateA 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:
('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:
1, 2,
3, 4,
5If 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
appleandappleare 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.