Turn a PHP array into JSON. To get your JSON, paste your PHP array into the input field below. You will retrieve a formatted JSON string that you can use in your code or API responses. It's returned in a readable format, so you can easily copy and paste it where needed. The converter accepts PHP array syntax and converts it to valid JSON.