Conversions
Données en colonne ici……
Output as
ou
Données délimitées ici……
0 éléments

Convert a CSV List to a JSON Array

Turn a flat list into "a", "b", "c" — the inside of a JSON array, quoted and comma-joined.

Already set up: split mode is comma, join is ,, wrapping each item in ". Paste one item per line and press convert to join it up.

Examples

InputOutput
Simple apple,banana,cherry "apple", "banana", "cherry"
Realistic GB,DE,FR,NL "GB", "DE", "FR", "NL"

Why convert this way

JSON needs double quotes on every string, and no trailing comma. Adding them by hand across a long list is tedious and a single missed quote invalidates the whole document.

When you will need it

  • Building an allowlist or enum in a config file
  • Writing a fixture or seed file from a spreadsheet
  • Pasting a list into a JSON request body
  • Creating an array literal in JavaScript or Python
Watch out: Wrap the output in [ ] yourself — this produces the contents, not the brackets. Values containing a double quote need escaping first, and JSON does not allow a trailing comma.

What the settings do here

  • Split on comma — the tool reads apple,banana,cherry as 3 separate items.
  • Join with , — producing "apple", "banana", "cherry".
  • Wrapped in " — turn wrapping off in Options when the values are numeric.

Where this comes up

Typical when hardcoding an allowlist. You have a list of country codes or feature flags in a spreadsheet and need them as a literal in a config file, with every quote in the right place.

Related conversions

Going the other way, or joining with something else entirely? The delimiter converter accepts any split and join pair including custom separators, and the index has the 16 ready-made ones.

Frequently Asked Questions

How do I turn a list into a JSON array?

Split on comma and join with a comma while wrapping each item in double quotes. That produces the contents of the array; add the surrounding square brackets yourself.

What breaks a JSON array built this way?

Two things: a value that itself contains a double quote, which needs escaping first, and a trailing comma, which JSON does not permit.