Column to Array
Runs in your browser — your data never leaves your device.
Convert a column of values into a JavaScript, JSON, Python, SQL or CSV list.
What is Column to Array?
Column to Array turns a list of values, one per line, into code you can paste straight into your project. Copy a column from Excel, Google Sheets or a query result, choose the output format and get a JavaScript array, JSON, a Python list, a SQL IN clause or a CSV line. The conversion happens as you type, entirely in your browser.
Useful for
- Building a SQL WHERE id IN (...) filter from a spreadsheet column.
- Turning a list of IDs or e-mails into a JavaScript or TypeScript array.
- Creating JSON fixtures and test data from real values.
- Writing Python lists for scripts and notebooks.
- Cleaning lists: trimming spaces, removing blank lines and duplicates, and sorting.
How to use
- Paste your column into the Input panel, one value per line.
- Choose the output format: JavaScript, JSON, Python, SQL IN or CSV.
- Adjust quotes, trailing comma, trimming, empty lines, duplicates and sorting; the output updates instantly.
- Click Copy to send the result to your clipboard.
Examples
Spreadsheet column to a JavaScript array
apple
banana
cherry[
"apple",
"banana",
"cherry"
]Names to a SQL IN clause
O'Brien
SmithIN ('O''Brien', 'Smith')Frequently asked questions
Is my data sent to a server?
No. The conversion runs entirely in your browser. Nothing you paste is uploaded or stored on a server.
How many lines can I convert?
Tens of thousands. Pasting 10,000 lines produces the result in well under a second on a typical computer.
Why are the quote and trailing comma options disabled for JSON?
JSON only accepts double-quoted strings and does not allow a trailing comma, so the tool enforces both to keep the output valid.
How are quotes inside values handled?
They are escaped for the chosen format: with a backslash in JavaScript, JSON and Python, doubled in SQL ('') and doubled inside quoted CSV fields ("").
Can I keep numbers without quotes?
Yes. Set Quotes to None and the values are written exactly as they are, which is ideal for numeric IDs.