Sample JSONJSON
GeneratedPHP
Paste or type JSON
JSON → PHP array · Local · No upload
JSON to PHP Array Converter
Sample JSON → PHP array literal · Short array syntax · Nested indentation · Escaped quotes
No upload, no storage
JSON is processed in memory and never sent to a server.
Share via URL fragment
Share links encode data in the # anchor — never sent to a server.
Remember last edit
Optionally keep your last input locally; clear it with one click.
Convert JSON to a PHP Array Literal|Short Array Syntax & PSR-12|Quotes and Backslashes Escaped|Runs Locally — No Upload
Data, Not Class Definitions
This page renders your JSON value as a pasteable PHP array — it does not generate classes.
Short Array Syntax
Bracket syntax with four-space PSR-12 indentation, the way modern PHP is written.
Quotes and Backslashes Escaped
Single quotes and backslashes inside values are escaped, so what you paste won't break on a syntax error.
Objects and Lists Kept Apart
Objects become keyed arrays, JSON arrays become plain lists, and the nesting stays easy to read.
Runs Locally — No Upload
Conversion runs in your browser; data is never uploaded.