{·}jsontools.me
JSON GUIDE

Why JavaScript loses precision on large JSON integers

Understand the 2^53−1 boundary and keep identifiers exact across tools.

6 minute read · Updated August 2026Check numeric safety

JSON numbers and JavaScript numbers are different concepts

JSON defines a numeric grammar but does not require IEEE-754 storage. JavaScript Number uses binary floating point and cannot represent every integer above 9,007,199,254,740,991 exactly.

Identifiers are especially vulnerable

Database IDs, snowflakes, and unsigned 64-bit values may be valid JSON integers yet change when parsed through JSON.parse. Once rounded, serializing again can silently emit a different identifier.

18446744073709551615
// valid JSON, not an exact JavaScript Number

Keep the lexical number until the consumer decides

A lossless parser retains the original number spelling. Validation can warn about JavaScript interoperability, while formatting and diffing continue to use the exact value.