Convert JSON into a valid PHP array literal so you can drop API data or config straight into a PHP file. This tool parses your JSON and emits modern PHP short array syntax with square brackets, using numeric keys for arrays and string keys for objects. Strings are single quoted with backslashes and quotes escaped correctly, booleans become true and false, null stays null, and numbers pass through unchanged. Nested objects and arrays are indented so the result is easy to read and edit. It is exactly what you need when building a config array, a test fixture or a seed file from an existing JSON payload. Paste your JSON, click convert, and copy the PHP. Everything runs locally in your browser, so nothing you paste is ever sent to a server.
Convert JSON into a valid PHP array literal so you can drop API data or config straight into a PHP file. This tool parses your JSON and emits modern PHP short array syntax with square brackets, using numeric keys for arrays and string keys for objects.
Yes. JSON to PHP Array is completely free, with no sign-up and no usage limits.
Yes. JSON to PHP Array runs in any modern web browser. There is nothing to download or install.
Yes. JSON to PHP Array runs entirely on your device in your browser, so nothing you enter is uploaded to a server.