How to use the list to comma separated (double quotes)
- Paste one item per line.
- Each item is wrapped in double quotes: "a","b","c".
- Wrap the result in [ ] to make a JSON array.
About this tool
Many languages and data formats want double-quoted strings. Paste one value per line to get "a","b","c" on a single line. Add square brackets around it to make a JSON or JavaScript array, then check it with the JSON formatter.
Making a JSON or JavaScript array
Paste one value per line to get "red","green","blue". Add square brackets around the result to get a valid JSON array, or assign it in JavaScript or Python:
const colours = ["red","green","blue"];
Paste the result into the JSON formatter to confirm it is valid before you use it.
Values that contain double quotes
A double quote inside a value must be escaped or the array breaks. In JSON and most programming languages, write it as \" (a backslash then a quote). This tool does not change the text inside your items, so fix those lines first. Backslashes inside values also need to be doubled in JSON.
CSV rows
In CSV, a field is wrapped in double quotes when it contains a comma, a quote or a line break, and any quote inside the field is written twice. A list quoted this way is fine for simple values, but for data with commas or quotes use a proper CSV export from your spreadsheet.
Single or double quotes?
JSON requires double quotes. SQL requires single quotes for text. In shell scripts, double quotes allow variables to expand while single quotes do not. Pick the one your target language needs, and switch with the Quotes dropdown on the main list to comma separated page.
Frequently asked questions
Can I make a JSON array?
Yes. Copy the output, add [ and ] around it, and check it in the JSON formatter.
What about quotes inside items?
They are not escaped. Escape them as \" before using the result in code.
Is my list uploaded?
No. Everything runs in your browser. Your input is never sent to a server.
How do I turn a column of names into a JSON array?
Paste the column, copy the double-quoted result, and add [ at the start and ] at the end.
Does the order stay the same?
Yes. Items keep the order you pasted them. Use the Sort Lines tool first if you want them sorted.