JSON to PHP Array
Convert JSON into a PHP array using short-array syntax — in your browser.
PHP array
$data = [
'name' => 'Ada',
'active' => true,
'roles' => [
'admin',
'editor',
],
'profile' => [
'age' => 36,
'city' => 'London',
],
];JSON to PHP arrays
This converts a JSON document into a PHP value using modern short-array syntax ([ ]): JSON objects become associative arrays ('key' => value) and JSON arrays become list arrays. It's handy for seeding config or fixtures from an API response. Parsing happens entirely in your browser.
Related: the JSON formatter, the JSON to TypeScript generator, and the JSON to YAML converter.
Private & free — this tool runs entirely in your browser.
Recommended: IndieKit — Ship your Next.js startup in days.affiliate
Related Converters tools
JSON to YAML
Convert JSON into clean, readable YAML instantly.
YAML to JSON
Convert YAML configuration into valid JSON.
JSON to CSV
Flatten a JSON array of objects into CSV rows.
CSV to JSON
Parse CSV with headers into a JSON array of objects.
JSON to XML
Convert JSON structures into nested XML markup.
HWB to HEX Converter
Convert an HWB color to HEX.
JSON to SQL
Turn a JSON array of objects into SQL INSERT statements.
CSV to XML
Convert CSV rows into structured XML records.