How to use this developer tool
- Select a conversion type.
- Paste static source data.
- Choose indentation and escaping options.
- Convert and review warnings.
- Copy or download the result.
Convert common PHP data representations such as arrays, JSON, query strings, JavaScript objects, and escaped strings without executing PHP code.
It parses static literals and key/value structures, converts supported primitive types, and reports unsupported dynamic expressions rather than evaluating them.
Dynamic PHP expressions, function calls, object creation, constants resolved at runtime, and executable code cannot be evaluated by this browser-only converter.
Input: ['name' => 'John', 'active' => true]
Output: valid JSON or JavaScript object syntax.
Choose PHP Array to JSON and paste a static array literal.
Choose JSON to PHP Array. Valid JSON objects and arrays are converted recursively.
Choose PHP Array to JavaScript Object. The tool serializes the parsed static array as JavaScript-compatible object syntax.
They require a PHP runtime and may depend on files, variables, functions, or environment state.
Choose Query String to PHP Array and paste key=value pairs joined with ampersands.
| Module | Purpose |
|---|---|
| PHP array | JSON and JavaScript |
| JSON | PHP array syntax |
| Query string | PHP array |
| String | Escape and unescape |