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
- Paste JSON in the editor
- Choose short array syntax [] or long array()
- Click Convert
- 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