Creative Workflow Helpers
PHP Array / JSON Converter
Paste a PHP array to get clean JSON, or paste JSON to get PHP array syntax. Everything runs in your browser — your data never leaves the page.
Direction & options
liveInput
PHP array
Accepts array( ... ) and [ ... ] syntax, including an
optional <?php, return, $var = wrapper and
trailing semicolon.
Paste valid JSON. Objects become associative arrays and arrays become PHP lists.
Output
Converted output appears here.
How it works
A small parser reads common PHP array syntax and rebuilds it as JSON. Sequential
integer keys starting at 0 become a JSON array; every other key set
becomes a JSON object, matching json_encode(). Going the other way, JSON
arrays become PHP lists and JSON objects become associative arrays. Invalid input is
reported with a line and column instead of a blank screen.