JSON Formatter
Pretty-print, minify, and validate JSON.
Loading tool
Paste a blob from an API and indent it, or crush it to one line. Parse errors stay on the page. The payload is not uploaded.
How to use this tool
- Paste the snippet. Drop JSON, code, or a token into the input. It is not sent to a server.
- Run the action. Format, decode, or generate. Parse errors stay on the page.
- Copy the output. Copy the result back into your editor or terminal.
Strictness
JSON.parse rules apply: no trailing commas, no comments, keys must be quoted. A JSONC toggle is not provided. If you need comments, strip them in your editor first.
Pretty print vs minify
Pretty print uses two-space indent so diffs stay readable. Minify removes insignificant whitespace for a request body or a bookmarklet. Optional key sort is alphabetical and recursive so two objects can be compared.
Errors
A SyntaxError from the parser is shown as-is. The usual causes are a trailing comma, a single-quoted key, or a truncated paste. Fix the input; this page will not guess.
Privacy
Tokens and customer records in JSON are still secrets. They stay in this tab. Refreshing the page clears them.
Frequently asked
Can I sort keys?
Yes. Optional key sort is alphabetical and recursive.
What about BigInt?
Numbers that lose precision are flagged. They are still parsed as IEEE floats.
Does it fetch a URL?
No. Paste the body yourself.
Can I collapse nodes?
The tree view folds objects and arrays. The text view is the source of truth for copy.
Is my payload stored?
No. It lives in this tab.