PHP print_r to JSON online converter

Back to all PHP tools

This online tool converts output of PHP print_r to JSON.  Notice! Currently could be unstable and it only works for stdClass objects. 

Input PHP print_r

Output

//Json output will appear here...

About print_r to JSON tool

PHP’s print_r function is a built-in utility function that displays information about a variable in a format that’s pretty much human-readable. It’s useful for debugging purposes, as it helps developers learn the structure and contents of variables like arrays and objects. This tool is useful if one has access to one of those print_r outputs and needs it as a JSON for some other purpose. Insert print_r output into the input field and it automatically converts into JSON data. This can also be used to make output of print_r to be pretty with the help of JSON. 

Scroll to Top