It runs your input through a strict JSON parser — the same rules any API or config file that expects real JSON will enforce — and reports either the formatted result or exactly where parsing failed. Nothing here is JavaScript-flavored leniency; if it's not valid JSON, it's flagged. Formatting happens as you type, entirely in your browser.
Format vs. Minify
Format re-indents the data with two spaces per level and one key per line, which is the easiest shape to read, review in a diff, or edit by hand. Minify removes every space and line break that JSON doesn't need, producing the smallest valid version for an API payload, a config value or an inline <script>. Both produce the same data; only the whitespace changes.
The rules that most often break JSON
| Invalid | Valid | Why |
|---|---|---|
{"a": 1,} | {"a": 1} | No trailing comma after the last item |
{'a': 'x'} | {"a": "x"} | Strings and keys need double quotes |
{a: 1} | {"a": 1} | Keys must be quoted strings |
{"a": 1 // note} | {"a": 1} | JSON has no comments |
{"a": NaN}, undefined | {"a": null} | Only numbers, strings, true, false, null, objects and arrays |
{"a": 07} | {"a": 7} | No leading zeros on numbers |
How to read the result
When the input is valid, the header shows the total number of keys, counted through every nested object — a quick way to confirm a large payload contains what you expect. When it's invalid, you get the parser's own error message. When that message includes a character position, the tool converts it into a line and column so you can jump straight to the problem in your editor. The real mistake is often just before that point, such as a missing comma on the previous line.
Things formatting changes that you might not expect
- Duplicate keys. If an object has the same key twice, the parser keeps the last value and the formatted output contains it only once. The JSON standard only says keys should be unique, and most parsers behave this way, so the earlier value is silently lost.
- Very large numbers. Numbers are read as standard double-precision values, so integers above 9,007,199,254,740,991 (for example 64-bit IDs) can come out rounded. Store such IDs as strings.
- Escapes. Escaped characters such as
\u00e9are decoded and written back as the character itself (é). The data is identical; only its spelling in the file changes.
Checking structured data
JSON-LD structured data is JSON, so a page's schema markup fails here for the same reasons: paste the contents of its <script type="application/ld+json"> block to find syntax errors. To check every JSON-LD block on a live page at once — whether each one parses and declares a @type — use the Schema Markup Validator.