PHP to JavaScript Object Converter

Convert PHP arrays to JavaScript object format with customizable indentation, variable declaration, and formatting options. Supports both indexed and associative arrays.

Paste your PHP array code here

Switch to JavaScript Object to PHP Array

Click to browse or drag and drop

Accepted: .php, .txt • Max: 10 MB

Your converted JavaScript object will appear here

Converted JavaScript object will appear here...