Skip to content
ZeroServer.tools

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.

Related Converters tools