Reference Knowledge Base

RFC 8259: The Official JSON Specification Guide

Learn what RFC 8259 is: the official IETF JSON standard defining syntax rules, data types, string escaping, number encoding, and strict parser requirements.

RFC 8259 is the official IETF Internet Standard defining the JSON data interchange format. Published in December 2017, it supersedes RFC 7159 and RFC 4627. It mandates UTF-8 encoding, strict double quotes, no comments, no trailing commas, and no leading zeros in numbers.

RFC 8259: The JSON Standard

RFC 8259 (published December 2017) is the authoritative IETF Internet Standard for the JSON data interchange format. It is co-published with ISO/IEC 21778:2017 and technically equivalent to ECMA-404.

Key Requirements of RFC 8259

  1. Encoding: JSON text MUST be UTF-8 encoded.
  2. Double quotes only: String values and object keys must use double quotes (").
  3. No comments: JSON does not define any comment syntax.
  4. No trailing commas: A comma after the last element in an object or array is illegal.
  5. No leading zeros: Numbers like 0123 are invalid.
  6. No NaN or Infinity: These IEEE 754 values have no JSON representation.
  7. Lowercase literals: true, false, and null must be lowercase.

RFC 8259 History

  • RFC 4627 (2006) — Original JSON specification by Douglas Crockford.
  • RFC 7159 (2014) — First revision, clarified interoperability.
  • RFC 8259 (2017) — Current standard, mandates UTF-8.
json
// RFC 8259 Compliance Examples

// ✅ Valid RFC 8259 JSON:
{
  "name": "Alice",
  "age": 30,
  "active": true,
  "data": null,
  "roles": ["admin", "editor"]
}

// ❌ Invalid under RFC 8259:
{
  'name': 'Alice',     // ❌ Single quotes
  age: 30,             // ❌ Unquoted key
  "items": [1, 2,],   // ❌ Trailing comma
  "val": 0123,         // ❌ Leading zero
  // comment           // ❌ Comment
  "nan": NaN           // ❌ NaN is not JSON
}

Try the free JSON Validator

Runs entirely in your browser — no upload, no signup, and your data never leaves your device.

Open JSON Validator

Frequently Asked Questions

What does RFC 8259 stand for?

RFC 8259 is a "Request for Comments" document published by the IETF (Internet Engineering Task Force) that defines the official JSON data interchange format standard.

How is RFC 8259 different from ECMA-404?

RFC 8259 and ECMA-404 are technically equivalent standards. RFC 8259 additionally mandates UTF-8 encoding for interoperability.

Does RFC 8259 allow JavaScript object literal syntax?

No. RFC 8259 JSON is stricter than JavaScript object literals. It forbids single quotes, unquoted keys, trailing commas, comments, undefined, and NaN.

Related JSON Topics & Reference Articles