Skip to content
Jellykit

List to Array Converter

Convert a list of lines into a quoted array for JavaScript, JSON, Python, PHP, Go, C#, Java or a SQL IN clause. Dedupe, trim and keep numbers unquoted.

Runs in your browser. Nothing is uploaded.

About List to Array Converter

Paste a column copied from a spreadsheet or a list of IDs, one per line, and get it as code: a JavaScript array, a Python list, a PHP array, a Go slice, a C# or Java collection, JSON, or a SQL IN (...) clause with properly escaped quotes.

Numbers are left unquoted automatically when every item is numeric, duplicates can be removed and long lists can be written one item per line.

How to use List to Array Converter

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

How are quotes inside items handled?

They're escaped for the chosen language: doubled for SQL, backslash-escaped for the others.

Can I paste comma-separated values?

Yes. Choose Commas and new lines as the separator.

Is List to Array Converter free and private?

Yes. List to Array Converter is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →