JSON to PHP Array Converter

Paste JSON and get a PHP array() or [] syntax equivalent ready to paste into code.

Summary

Paste JSON and get a PHP array() or [] syntax equivalent ready to paste into code.

How it works

  1. Paste JSON in the editor
  2. Choose short array syntax [] or long array()
  3. Click Convert
  4. Copy the PHP array output

Use cases

  • Hardcoding API response fixtures in PHP tests
  • Converting JSON config to PHP array constants
  • Bootstrapping PHP seed data from JSON

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu