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

Your converted JavaScript object will appear here