Developer tools
Array to JSON converter
Paste a PHP array, a JavaScript array, or JSON. Get pretty JSON back — still on this device.
Processed in your browser — nothing is uploaded
Convert array to JSON without a server hop. This page is a PHP array to JSON converter, a JavaScript array to JSON converter, and a landing pad for Power Automate array to JSON output.
PHP convert array to JSON
Paste classic array('name' => 'Ada', 'langs' => array('PHP', 'JS')) or short ['name' => 'Ada'] syntax. => becomes JSON keys, nested array() becomes nested JSON, and true / false / null stay typed. Trailing commas are allowed. Array to JSON PHP and convert PHP array to JSON are the same pass.
JavaScript array to JSON
JS array to JSON and convert array to JSON JavaScript accept ['a', 'b', {name: 'Ada'}] with single quotes, unquoted keys, and trailing commas. If the paste is already valid JSON, it is pretty-printed.
Power Automate array to JSON
Copy the output of a Compose, Select, or variable. JSON arrays convert directly. createArray('Red', 'Blue') is treated like a PHP/JS list. For CSV tables, use CSV to JSON. To pretty-print or minify the result, continue to the JSON formatter.
Last reviewed 2026-09-10.
FAQ
Questions, answered
Can I convert a PHP array to JSON?
Yes. Paste a PHP array() or short [] with => pairs. This is a PHP array to JSON converter — php convert array to json, convert php array to json, and array to json php all run here.
Does it convert a JavaScript array to JSON?
Yes. JS array to JSON and convert array to json javascript work with single quotes, unquoted keys, and trailing commas. Valid JSON is pretty-printed as-is.
What about Power Automate array to JSON?
Paste the array output from a Compose or Select action. JSON arrays convert directly. createArray() is also accepted.
Does my text leave the browser?
No. Parsing runs in JavaScript on this page. Use it on fixtures, tokens, and private payloads.
Related