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.

Frequently asked questions

What does it flag?

Trailing commas, comments, single quotes, unquoted keys, NaN and Infinity, and numbers that exceed safe integer precision.

Why does number precision matter?

Integers beyond the safe range parse without an error but silently lose precision, corrupting the value.

It found comments — how do I remove them?

Use the JSON comments stripper to strip comments and trailing commas.

How is this different from a schema validator?

This checks syntactic strictness against RFC 8259; a schema validator checks the data against declared rules.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: