Convert JSON to PHP arrays

JSON objects become associative PHP arrays and JSON lists become indexed arrays. Short or long array syntax, quote style, and indentation can be chosen explicitly.

PHP associative arrays

PHP arrays combine list and map behavior, while JSON separates arrays and objects. This converter supports unambiguous lists and fully keyed arrays rather than guessing about mixed keys.

Why arbitrary PHP is rejected

Running submitted PHP would create a code-execution boundary. The reverse converter instead recognizes only literal strings, numbers, booleans, null, and nested arrays.

Frequently asked questions

Are variables or function calls supported?

No. Executable and expression syntax is rejected.

Does the conversion contact PHP?

No. Both directions run in browser JavaScript.