JSON Strict Validator (RFC 8259, Number Precision)
Validate JSON against the strictest interpretation of RFC 8259 — the official JSON spec. Catches: trailing commas, comments, single quotes, unquoted keys, NaN / Infinity, and numbers that exceed JavaScript's safe integer range (which silently corrupt during parse).
How to use the JSON Strict Validator (RFC 8259, Number Precision)
Paste JSON. The validator checks each kind of non-strict construct and reports per-line where each violates the spec. Useful when preparing JSON for a strict consumer (a wire protocol, a database column with strict JSON validation, a federated standard).
Checking JSON against RFC 8259
Many parsers are lenient — they quietly accept trailing commas, comments, single quotes, or NaN that the JSON spec forbids — so text that works in one place fails in another. Worse, a large integer can parse without error yet silently lose precision once it exceeds the safe range, corrupting data with no warning at all.
This validates against the strictest reading of RFC 8259 and flags exactly those traps: trailing commas, comments, unquoted keys, single quotes, NaN and Infinity, and numbers beyond safe integer precision. If the problem is comments, the comments stripper removes them to produce clean JSON; to then canonicalise the formatting, the strict prettifier sorts and reindents it.
Common use cases
- Prep for a strict consumer — ensure JSON passes a wire protocol or strict parser.
- Catch precision loss — flag integers too large to survive a parse intact.
- Find hidden comments — spot comments and trailing commas a lenient editor allowed.
- Validate a DB column — confirm JSON meets a strict-validation constraint.
- Standards compliance — check data against the official RFC 8259 rules.