Everything runs on your machine — your file is processed right here in your browser and never uploaded to any server.
Input
JSON
Loading...
Output
PHP array
Loading...
Paste your JSON into the left editor, or click Load File if the data lives in a file on your computer.
The PHP array literal is generated live in the right editor while you type — no submit step needed.
Fix any JSON syntax errors flagged during editing and watch the output correct itself instantly.
Click Copy to insert the array into your PHP source, or Download to save the snippet as a file.
PHP developers constantly receive data as JSON — API samples, exported settings, test fixtures — yet inside a PHP codebase the natural shape for that data is a native array. This tool converts any JSON document into PHP array syntax you can drop straight into a config file, a database seeder, or a unit test.
It fits Laravel work particularly well, where files in the config directory simply return arrays: paste a JSON sample of your settings and get a ready-made return value. It is also a quick way to build fixture data for PHPUnit tests without calling json_decode on raw strings at runtime.
100% private“The conversion engine here is plain JavaScript executing in your browser, not a remote service. Your API keys, settings, and sample records are transformed on-device and are never posted, cached, or inspected by any server.”
Yes. The generated code uses the modern bracket style rather than the older array() call, matching current PSR-influenced coding standards and every supported PHP version in use today.
A literal array is parsed once when the file is compiled and benefits from opcache, while json_decode does work on every request. Literal arrays are also easier to read in code review and can hold inline comments after conversion.
JSON objects become associative arrays using the arrow operator between keys and values, and JSON arrays become sequential PHP arrays. Nesting is preserved to any depth with matching indentation.