100% on-device · nothing uploaded

JSON formatter & validator

Paste JSON and get it back readable. If it is broken, you get the error and where it is — not just "invalid". Nothing is uploaded, so pasting an API response with real data is safe.

How to use it

  1. Paste your JSON into the box.
  2. Press Format for indented output, or Minify to strip every unnecessary byte.
  3. If the JSON is invalid, the error message names the position so you can find it.

The parts of JSON that are legal but not portable

RFC 8259 says object names SHOULD be unique — it does not forbid duplicates. JavaScript’s parser keeps the last occurrence, Python’s json module also keeps the last, and some decoders keep the first or raise. When two systems in one request chain disagree, the result is a parser differential: a validating proxy reads one value while the service behind it acts on another. That pattern sits underneath several published authentication bypasses.

Numbers are the other portability edge. JSON has one numeric type and states no precision; JavaScript parses every one into an IEEE 754 double, exact for integers only up to 2^53 minus 1. A 19-digit identifier — a snowflake id, a Postgres bigint — silently rounds, so 9007199254740993 comes back as 9007199254740992. That is why APIs carrying 64-bit ids emit them as strings, and the same ceiling applies to whatever you paste.

Why your config file refuses to parse

JSON has no comments, by deliberate removal: Douglas Crockford took them out after seeing people smuggle parsing directives into them. That decision is why tsconfig.json, .eslintrc.json and VS Code’s settings are really JSONC, and why they are rejected here despite being the files everyone calls JSON. Trailing commas are the same story reversed — legal in JavaScript object literals since ES5, still forbidden in JSON.

Formatting does not sort keys or alter value types beyond a parse-and-re-serialise round trip, with one exception. JavaScript orders integer-like keys numerically ahead of string keys, so an object keyed 10, 2 and name returns with 2 and 10 first. That is the language’s object model, not a choice made here. Validation is syntactic only: a document can be well-formed and still be entirely the wrong shape.

Questions

Is it safe to paste production data?

Yes — the parsing happens in your browser with the built-in JSON parser. Nothing is sent to a server, logged or stored.

Why does my JSON say it is invalid?

The usual causes are trailing commas, single quotes instead of double quotes, and unquoted keys. All three are valid JavaScript but not valid JSON.

What does minify do?

It removes all whitespace and line breaks, producing the smallest byte-identical-in-meaning JSON — which is what you want to store or transmit.

Updated 2026-07-20. Runs fully in your browser — nothing is uploaded.