FreeDev Tools

JSON to PHP Array

Convert JSON objects to PHP array syntax β€” short array notation, properly escaped, copy-paste ready.

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

How to Use

  1. 1

    Paste your JSON

    Paste any JSON object or array into the input panel.

  2. 2

    Copy the PHP array

    The equivalent PHP short-array assignment appears instantly in the output panel.

  3. 3

    Use it in your code

    Paste into your PHP source β€” config files, fixtures, or seed data β€” with no further editing.

Frequently Asked Questions

Modern short array syntax ([...]) with string keys quoted using single quotes and proper escaping. The output is a complete $data = [...]; assignment you can paste into any PHP file.