If you pass the JSON in your post to json_decode, it will fail. Valid JSON strings have quoted keys:

json_decode('{foo:"bar"}');         // this fails
json_decode('{"foo":"bar"}', true); // returns array("foo" => "bar")
json_decode('{"foo":"bar"}');       // returns an object, not an array.
Answer from RickN on Stack Overflow
๐ŸŒ
Jsontophp
jsontophp.com
Convert JSON Object to PHP Array Online
JSON to PHP array converter online - Convert the given JSON object or Array into beautified PHP array that can be used instantly into your PHP file as a PHP array
๐ŸŒ
Code Beautify
codebeautify.org โ€บ json-to-php-array-converter
JSON to PHP Array Converter to convert JSON to PHP Array Variable
This JSON to PHP Array converter utility can convert JSON in JavaScript Object Notation format to PHP arrays. This is an online tool and does not require any installation or plugin.
๐ŸŒ
PHPpot
phppot.com โ€บ php โ€บ json-to-array-php
Convert JSON to Array in PHP with Online Demo - PHPpot
Creating an online converter for JSON to an array decoding with a single line using PHP json_decode native function.
People also ask

What is JSON to PHP Array Converter used for?
Convert JSON to PHP array syntax and PHP arrays to JSON. Perfect for PHP developers working with APIs and configuration files.
๐ŸŒ
devtoollab.com
devtoollab.com โ€บ home โ€บ tools โ€บ json to php array converter | json to php code online free
JSON to PHP Array Converter | JSON to PHP Code Online Free - ...
Is JSON to PHP Array Converter free to use?
Yes. JSON to PHP Array Converter is completely free with no usage limits, and there is no paid tier required to use it.
๐ŸŒ
devtoollab.com
devtoollab.com โ€บ home โ€บ tools โ€บ json to php array converter | json to php code online free
JSON to PHP Array Converter | JSON to PHP Code Online Free - ...
Do I need an account to use JSON to PHP Array Converter?
No. JSON to PHP Array Converter works immediately in your browser with no signup, login, or email address required.
๐ŸŒ
devtoollab.com
devtoollab.com โ€บ home โ€บ tools โ€บ json to php array converter | json to php code online free
JSON to PHP Array Converter | JSON to PHP Code Online Free - ...
๐ŸŒ
HTML Code Generator
html-code-generator.com โ€บ tools โ€บ json-to-php-array
Best Online JSON To PHP Array Converter
Convert JSON or JavaScript object code into a clean, ready-to-use PHP associative array instantly. This online tool supports nested structures, short and long PHP syntax, key transformations (snake_case, camelCase, PascalCase, kebab-case), dot notation flattening, smart number handling, and large array formatting.
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ php_json.asp
PHP and JSON
The json_decode() function is used to decode a JSON object into a PHP object or an associative array.
Find elsewhere
๐ŸŒ
DevToolLab
devtoollab.com โ€บ home โ€บ tools โ€บ json to php array converter | json to php code online free
JSON to PHP Array Converter | JSON to PHP Code Online Free - DevToolLab
February 5, 2026 - Yes. JSON to PHP Array Converter is completely free with no usage limits, and there is no paid tier required to use it. No. JSON to PHP Array Converter works immediately in your browser with no signup, login, or email address required.
๐ŸŒ
ExtendsClass
extendsclass.com โ€บ json-to-php.html
JSON to PHP array
This tool allows you to convert json to php array, object or associative array. It allows you to quickly convert your json data into php objects without having to convert them yourself manually.
๐ŸŒ
ConvertSimple
convertsimple.com โ€บ home โ€บ convert json to php array
Convert JSON to PHP Array - ConvertSimple.com
June 19, 2022 - Use this JSON to PHP converter tool by pasting or uploading JSON in the left box below. Results will appear in the box on the right. Convert your JSON to a PHP array.
๐ŸŒ
ProxyScrape
proxyscrape.com โ€บ tools โ€บ php-to-json
PHP Array to JSON Converter - ProxyScrape Tools
Free online tool to convert PHP arrays to JSON format. Convert PHP array syntax to valid JSON objects and arrays with proper formatting. Perfect for PHP developers working with APIs.
๐ŸŒ
Unserialize
unserialize.com
Unserialize - PHP, JSON, Base64
A common problem: you have a serialized PHP or JSON string, maybe even base64 encoded, but what you really want is an easy-to-read unserialized version. Unserialize is the solution.
๐ŸŒ
Wtools
wtools.io โ€บ convert-json-to-php-array
Convert JSON to PHP Array Online | WTOOLS
Free tool for online converting JSON into appropriate PHP type as Array.
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ php โ€บ 0uwqq41y โ€บ json-to-array-php-example
How do I convert JSON to PHP array?
In this JSON Convert to PHP Array example, we use the json_decode() function to convert JSON string to a PHP array. Click Execute to run the JSON to PHP Array Example online and see the result.
๐ŸŒ
Table Convert
tableconvert.com โ€บ home โ€บ json array to php array converter online - free tool
JSON Array to PHP Array Converter Online - Free Tool
July 28, 2025 - Convert JSON Array to PHP Array online. Paste or upload data, preview rows in the table editor, then copy or download clean PHP output.
๐ŸŒ
Netlify
json2php.netlify.app
JSON to PHP - json_decode online
A free online tool to validate and convert JSON to PHP array ready to be put into a file, or to convert a PHP array into JSON. All processing is done locally and no data is being sent to the server.
๐ŸŒ
OnlinePHP
onlinephp.io โ€บ json-decode
json_decode - Online Tool
Execute and test json_decode with this online tool
๐ŸŒ
Minifier
minifier.org โ€บ json-to-php
Convert JSON to PHP Array Online
JSON to PHP Converter is an online tool that converts JSON data into PHP arrays or objects. This online tool simplifies the JSON to PHP conversion process without requiring any additional software or plugin installation.
๐ŸŒ
Wtools
wtools.io โ€บ convert-php-array-to-json
Convert PHP Array to JSON Online | WTOOLS
Convert JSON to PHP Array OnlineConvert PHP Array to XMLConvert PHP Array to YAMLSerialize PHP arrayConvert PHP Array to PListConvert PHP array to JS ObjectConvert print_r output to PHP array