Heading image
Heading icon Useful Tools

print_r to json online converter


Show example

It is very common that a developer may need to transfer same data from one form to another.

We very often use function print_r to export some data and store this data in a log file. However sometimes it might be required to transfer this data back to another format. A good example is json. It is not easy to acquire any data that can be read back by PHP from this print_r output, but you can easily do this when you use the json format.

So we have created a simple tool where you can paste the original print_r results and you can then retrieve the json output. Try to place a simple print_r response in the textarea above.

Our website is encoded in UTF-8, so please place your text in UTF-8. The main feature is based on the print_r_reverse function that is available in the official PHP print_r documentation.