You can do the same in the browser console. I don't really get why people need an online tool for this:
copy(JSON.stringify(obj, null, 2))
obj can be parsed with JSON.parse if it is in text.