I wrote a simple PHP utility that will convert ugly, convoluted JSON into a nicer, standard format. It doesn’t perform any validation and is not optimized whatsoever – but maybe it’s just what you’re looking for. You can find it over on github: Tidy JSON.
Usage:
<?php
require 'tidyjson.php';
$json = '{"foo":"bar","baz":[1,2,5]}';
$tidy = TidyJSON::tidy($json);
?>