Toolstia / Comma separated list converter
Convert lines to a comma separated list
Paste a column from a spreadsheet and get a single line with commas between the items, ready for code, SQL or an email field. Or go the other way and turn a comma separated list into one item per line. Semicolons, pipes, tabs and your own separator work too.
Paste a list to start.
How it works
- Choose which direction to convert.
- Pick the separator and, if needed, quotes.
- Paste your text and copy the result.
Lines to a list
Each line becomes an item. Blank lines are skipped and spaces around items are trimmed. Wrap items in double or single quotes to build values for a SQL IN clause or a code array, for example 'a', 'b', 'c'.
A list to lines
The list is split at every separator, spaces around items are removed and empty items are dropped. Quotes around items can be stripped, which is handy when cleaning a CSV row.
Separators
Comma, semicolon, pipe, tab and space are built in. Choose Custom for anything else, even several characters such as " - ".
Not a full CSV parser
The splitter does not understand commas inside quoted values. For real CSV files use the CSV to JSON converter.
Questions
How do I paste a column from Excel?
Select the cells, copy, and paste here. Each cell arrives on its own line.
Can I get a space after each comma?
Yes, that option is on by default and can be switched off.
Is there a limit?
No fixed limit. Tens of thousands of lines work on a normal computer.
Is anything uploaded?
No. Your list stays in your browser and is never sent anywhere.