JSON / PHP Array Converter is a free online developer tool to convert between JSON data and PHP arrays.
This tool is split into two modes: JSON to PHP Array
and PHP Array to JSON
.
JSON to PHP Array - Converts JSON data to a PHP array. Enter JSON data in the input field and click the convert button.
Otherwise, you can fetch JSON data from an API by entering a URL, and then click the fetch button and convert button respectively. The output PHP array will be displayed accordingly
Optionally, you can select your preferred indentation level whether it be space
or tab
and quote type between single quote
and double quote
for the output PHP array.
PHP Array to JSON - Converts a PHP array to JSON. Enter a PHP array in the input field and select your preferred indentation level for the output JSON data. You can even minify it using the compact
option.
And then click the convert button to get the result. The output JSON data will be displayed accordingly.
When you're done, you can either copy the result to your clipboard using the copy button or download it as a file to your device using the download button.