JavaScript Array to JSON Converter
Paste a JavaScript array literal and get JSON you can copy or save. ArrayCat reads the literal as data.
Worked example
['001', 2, true,]["001", 2, true]Use quoted strings, decimal numbers, booleans, null and nested arrays or objects. Fill an empty slot with null and give each property a unique key. If an item is an expression, replace it with its value. Put long IDs in quotes to keep every digit.
If your array is already in a JavaScript variable, call JSON.stringify(values). Add two-space indentation with JSON.stringify(values, null, 2). See the ECMAScript reference.