Convert JSON to ARRAY, Free
Files convert instantly in your browser. 100% private, any file size, no account needed.
How to convert JSON to ARRAY
Converting JSON to an array is a parsing step that appears in JavaScript, Python, and virtually every modern language that works with API responses or configuration files. In JavaScript, JSON.parse() returns a value that may already be an array if the root JSON element is an array literal (starting with '[') rather than an object (starting with '{'). If the JSON root is an object, you typically extract a specific property whose value is an array.
This tool takes a JSON string as input, validates it, and extracts the root element as an array. If the root is a JSON object, the tool shows the available top-level keys and lets you select which key's value to extract as an array, handling the common pattern of {data: [...]} API responses.
Paste the JSON string
Enter the JSON you want to convert. It can be a root-level array like [1,2,3] or an object containing an array like {results: [...]}
Select the array path if needed
If the root is an object, choose the key whose value is the array you want. For nested paths like data.items, enter the dot-separated path.
View the array
The converter displays the extracted array, pretty-printed, and shows the item count.
Copy for use in code
Copy the array representation for use in JavaScript, Python, or as input to another converter or tool.
Frequently asked questions
How do I convert a JSON string to an array in JavaScript?
Use JSON.parse(). If the JSON root is an array: const arr = JSON.parse(jsonString). If it is an object: const arr = JSON.parse(jsonString).items (replacing 'items' with the actual key). Wrap in try/catch to handle malformed JSON.
How do I convert a JSON string to a list in Python?
import json; data = json.loads(json_string). If the root is a list, data is already a Python list. If it is a dict, access the list with data['key']. json.loads() raises json.JSONDecodeError for invalid JSON.
What is the difference between a JSON array and a JSON object?
A JSON array is an ordered list wrapped in square brackets: [1, 2, 3]. A JSON object is an unordered collection of key-value pairs wrapped in curly braces: {a: 1, b: 2}. Arrays have numeric indices; objects have string keys.
What if my JSON contains nested arrays?
JSON.parse() returns the full nested structure. Access nested arrays using chained property access or bracket notation: data.results[0].items. You can also use JSON path libraries for complex extraction from deeply nested structures.
Can I convert a JSON object to an array of its values?
Yes. In JavaScript: Object.values(JSON.parse(jsonString)) returns an array of the object's values. Object.entries() returns an array of [key, value] pairs. Object.keys() returns just the keys.