{·}jsontools.me
JSON · JAVASCRIPT OBJECT NOTATION

What is JSON?

The data-interchange format behind most web APIs: its grammar, the four places it surprises people, and how to convert it.

6 minute read · Updated August 2026

A grammar small enough to memorise

JSON has exactly six value types: object, array, string, number, boolean, and null. There are no dates, no integers-versus-floats distinction, no comments, and no trailing commas. That smallness is the point — it is why a JSON parser exists for effectively every language, and why two systems that share nothing else can still agree on a payload.

An object is an unordered set of name/value members. An array is an ordered sequence. Strings are double-quoted and use backslash escapes. Everything else in the format is punctuation.

{
  "service": "checkout-api",
  "orders": [
    { "id": "ord_101", "status": "paid", "total": 129.5, "currency": "USD" },
    { "id": "ord_102", "status": "failed", "total": 42, "currency": "USD" }
  ]
}

Numbers are the part that bites

JSON's grammar allows a number of any magnitude and precision, but most parsers decode into an IEEE 754 double. Any integer beyond 2^53 − 1 silently loses precision — a 64-bit database ID such as 18446744073709551615 comes back as a different number, with no error raised anywhere.

If you exchange large integers, either transport them as strings or use a parser that preserves them exactly. This workbench parses numbers losslessly, which is why a 20-digit ID survives a format, a diff, and a round-trip through the tree view.

What JSON deliberately leaves out

There is no comment syntax, so configuration files written in JSON cannot explain themselves; JSONC and JSON5 exist to fill that gap and are not interchangeable with strict JSON at an API boundary. There is no schema in the format itself — JSON Schema is a separate specification layered on top. And member order is not semantically meaningful, even though most parsers preserve it.

Duplicate keys are the sharpest edge: the specification does not forbid them, and implementations disagree about whether the first or last wins. A document with duplicate keys can mean two different things to two correct parsers.

Converting out of JSON

Every other format on this site can represent less than JSON can, in some specific way: CSV has no nesting, XML has no arrays, TOML has no null. Conversion is therefore always a mapping decision rather than a lossless translation, and the honest thing for a converter to do is show you the result before you commit to it.