FreeDev Tools

JSON to PHP Array

Convert JSON into PHP array syntax β€” short [] or classic array() style.

Runs locally in your browser. Your input is not uploaded.

How to Use

  1. 1

    Paste JSON

    Any valid JSON value β€” object, array, or scalar.

  2. 2

    Pick the array style

    Short [] syntax or classic array(), with an optional $data = wrapper.

  3. 3

    Copy the PHP

    Paste the generated array straight into your PHP source file.

Frequently Asked Questions

Paste valid JSON and the tool emits equivalent PHP source: objects become associative arrays with 'key' => value pairs, arrays become lists, all recursively indented.