Formats JSON at two or four spaces, or minifies it to a single line. Invalid input shows the browser parser’s own message rather than a vague “invalid JSON”, so you can find the character that broke it.
Runs entirely in your browser
JSON is easy to produce and hard to read once it is minified onto one line. This tool pretty-prints JSON with two- or four-space indentation, minifies it back to a single line, and validates it — the three things you constantly need when working with API responses and config.
When the input is invalid, it shows the browser parser’s own error message rather than a vague “invalid JSON”, so you can jump straight to the character or position that broke it. That is far more useful than a generic failure when you are hunting a stray comma or missing bracket.
It runs entirely in your browser, so the data you paste — which may be a real API response with sensitive fields — is not uploaded. Use it to make a response readable, to compact JSON for embedding, or to check that a payload is well-formed.
TechToolsHQ is an independent, reader-supported tech platform. If this free tool saved you time, solved a problem, or helped your workflow, consider supporting our work. Your support helps us keep our utilities 100% free, private, and ad-free for everyone.