Convert a list of lines to comma separated text, SQL IN lists, JavaScript, JSON, Python or PHP arrays. Quote items, wrap long lines and remove duplicates instantly.
Free, no sign-up
Runs in your browser
Your data stays private
How to use the List to Comma Converter
Paste one item per line.
Pick a format: plain text, SQL IN, JavaScript, JSON, Python, PHP or quoted CSV.
Copy the output.
Why use this List to Comma Converter
Code-ready formatsProduces valid SQL IN (...) lists and JS, JSON, Python and PHP arrays with correct escaping.
Smart quotingNumbers can stay unquoted while text is quoted automatically.
Line wrappingBreak the output after every N items to keep long lists readable.
CleanupTrim lines, skip blanks and remove duplicates.
Frequently asked questions
How do I make a SQL IN list from a column of values?
Choose the "SQL IN" format. Text is quoted with single quotes, and quotes inside values are doubled.
Can I get a JSON array?
Yes. Pick JSON and every item is properly escaped.
Can I change the separator?
For plain and CSV formats you can use a comma, semicolon, pipe, tab, space or custom text.