Free · No sign-up · Runs in your browser

JSON to PHP Array Converter

Convert JSON objects and arrays into ready-to-paste PHP array syntax while preserving nested values and Unicode text.

STEP 1

Start with your input

Edit the example or replace it with your own text.

How to use JSON to PHP Array Converter

  1. Paste or edit the json object or array.
  2. Select convert to php array to process the input locally in your browser.
  3. Review the output, then copy it or download the converted file.

Convert JSON to PHP Array without losing useful fields

Generates a PHP return statement with associative arrays, escaped strings, booleans and null values. Output is source code: review it before adding it to an application.

Check the output before importing it

The converter reports invalid or unsupported input rather than guessing silently. Review the generated values in the destination application, especially date formats, nested data and identifiers that may have special meaning there.

Example input

{"name":"Ada","roles":["admin","editor"],"active":true}

Is my input stored?

No. This conversion runs in your browser and your input is not uploaded.

Is input uploaded?

Processing takes place in your browser. This tool does not send your input or selected files to a conversion API.

Related tools and guides

Browse all developer tools