JSON formatter & validator
Pretty-print, minify and validate JSON with the error located for you.
36% smaller
How it works
Parsing and formatting both happen in your browser using the native JSON engine — the same one your code will use. Nothing is transmitted, which matters when the payload you are debugging contains tokens or customer data.
Common causes of “invalid JSON”
- Trailing commas. Legal in JavaScript, illegal in JSON.
- Single quotes. JSON strings must use double quotes.
- Unquoted keys.
{name: 1}is a JavaScript object literal, not JSON. - Comments. JSON has none. JSON5 and JSONC do; plain JSON does not.
- NaN and Infinity. Not representable — they must be null or a string.
Key order
JSON objects are unordered by specification, but every real parser preserves insertion order, and diffs care about it. Sorting keys makes two payloads comparable when they were serialised by different systems.
Number precision
JSON numbers are parsed as IEEE-754 doubles, so integers beyond 2⁵³ lose precision silently — a real hazard with 64-bit database IDs and Twitter-style snowflake identifiers. APIs that return large IDs should send them as strings.