Array ↔ JSON Converter
Convert JSON to arrays in PHP, JavaScript, TypeScript, Python, or Ruby — and back again. Everything runs in your browser.
Convert to:
Supported Syntax
PHP
Supports both array() and [] syntax, => for key-value pairs, $var = prefix, and <?php tags.
JavaScript
Supports const/let/var declarations, unquoted keys, single-quoted strings, and inline comments.
TypeScript
Same as JavaScript with support for type annotations (const data: Type = ...).
Python
Supports variable assignment, True/False/None, single-quoted strings, and inline # comments.
Ruby
Supports both new-style (key: value) and old-style ("key" => value) hash syntax, and nil.