G
Great Online Apps

JSON to PHP Array

Guide
Input JSON Up to 100,000 characters.
PHP short array

About the JSON to PHP Array

Turn a JSON object or array into PHP code you can paste straight into a config file, a test fixture or a seeder. The output uses short [] syntax with => between keys and values, and four-space indentation.

How to use it

  1. 1 Paste JSON into the Input JSON pane.
  2. 2 Read the PHP short array in the output pane; it updates as you type.
  3. 3 If the JSON is invalid, fix the error shown in the output pane.
  4. 4 Click Copy and paste the array into your PHP code.
Read the full JSON to PHP Array guide

Frequently asked questions

G
Great Online Apps
Toggle sidebar