Is
a Standard?
A published community specification, not an IETF, Ecma or ISO standard.
JSON has an Internet Standard, an Ecma standard and an ISO/IEC standard. JSON5 has one openly licensed document, version 1.0.0, kept on GitHub by the project itself. That difference matters for some uses and not at all for others.
This page sets out exactly what that document promises, how it relates to ECMAScript 5.1, the unregistered media type, the file extension, structured suffix rules, open standardization requests and when relying on the format is reasonable.
TL;DR: JSON5 is specified by The JSON5 Data Interchange Format 1.0.0 (March 2018). No standards body has adopted it. application/json5 is in real use but is not in the IANA registry, and no +json5 suffix is registered. Use it where you control the parser, such as configuration files, and convert to strict JSON at boundaries.
Status at a Glance
| Recognition | JSON | JSON5 |
|---|---|---|
| IETF Internet Standard | ||
| Ecma standard | ||
| ISO/IEC standard | ||
| IANA media type | application/json | |
| TC39 proposal listed | TC39 is the committee listed for ECMA-404 | |
| Public written specification |
The negative entries were checked on November 29, 2026 against the IANA media type registry, the IETF Datatracker (no document with "json5" in its name or title) and TC39's proposal lists (README, finished, inactive and stage 0 and 1 files, none of which mention JSON5). "Not a standard" describes who has approved the document. It says nothing about how precise the document is or how widely it is used.
What JSON Has: Three Standards
| Document | Date | Status |
|---|---|---|
| RFC 4627 | July 2006 | Informational; registered application/json. Obsolete |
| ECMA-404, 1st edition | October 2013 | Ecma standard |
| RFC 7159 | March 2014 | Standards Track. Obsolete |
| ISO/IEC 21778:2017 | November 2017 | International Standard, reviewed and confirmed in 2023 |
| RFC 8259 | December 2017 | Standards Track; the current IETF definition (STD 90) |
| ECMA-404, 2nd edition | December 2017 | Current Ecma edition |
RFC 8259 states that the grammar is meant to be the same as in ECMA-404 and that Ecma and the IETF will work together if either document needs to change. That coordination is a large part of what formal standardization buys: one grammar, more than one organization committed to keeping it aligned, and a stable citation for contracts and procurement.
A detail that is often missed
Section 9 of RFC 8259 says a JSON parser must accept all conforming JSON texts and "MAY accept non-JSON forms or extensions". A program that reads JSON and also tolerates JSON5 can therefore still be a JSON parser. The freedom is one-sided: section 10 requires a JSON generator to produce text that strictly conforms to the grammar, so writing JSON5 and calling it JSON is not allowed. RFC 8259 also requires UTF-8 for JSON exchanged outside closed ecosystems.
The JSON5 Specification Document
| Property | Value |
|---|---|
| Title | The JSON5 Data Interchange Format |
| Version and date | 1.0.0, March 2018 |
| Address | spec.json5.org; source in json5/json5-spec |
| Label at the top of the page | "Standard JSON5" |
| Abstract's own description | "a proposed extension to JSON" |
| Editors | None named in the document. The license notice names Aseem Kishore and Jordan Tucker; the project README credits Tucker with writing it |
| License | MIT, "Copyright (c) 2017 Aseem Kishore, Jordan Tucker" |
| Structure | Clauses 1 to 11 (values, objects, arrays, strings, numbers, comments, white space, grammar, parsers, generators) and annexes for conformance and license |
| Tagged releases | v0.5.0-draft (prerelease, March 30, 2016) and v1.0.0 (published March 16, 2018) |
| Change process | GitHub issues and pull requests on the specification repository |
The two descriptions in the table are not a contradiction so much as a reminder of scope. A commit titled "Promote to standard" on March 11, 2018 marked the end of the draft period. "Standard" there is the project's own label, like many community specifications, and the word "proposed" in the abstract remained. Later commits through May 2023 are housekeeping such as folder layout, the web address and a README link. The wider story is on the history page.
The v1.0.0 release note states the project's expectation in one sentence: "JSON5 parsers and generators are expected to conform to this specification." A separate v1.1.0 branch, last committed to on March 16, 2018, adds a recommendation that generators write dates and times as RFC 3339 strings in UTC, or alternatively as Unix time. It has not been merged, so cite 1.0.0 and do not treat that text as part of the specification.
Conformance language
Annex A says the requirement words are interpreted as in RFC 2119, although for readability they are not written in capitals. All text is normative except sections marked non-normative, examples and notes. The core obligations are short:
| Role | Requirement |
|---|---|
| Parser | Must accept every text that conforms to the grammar |
| Parser | May accept non-JSON5 forms or extensions |
| Implementations | May limit text size, nesting depth, number range and precision, and string length and contents |
| Parser | Should warn when it finds unescaped U+2028 or U+2029 in a string |
| Generator | Output must strictly conform to the grammar |
| Generator | Should escape U+2028 and U+2029 in strings |
| Documents | Object names should be unique; with duplicates, behavior is unpredictable |
| Authors | Should avoid unescaped U+2028 and U+2029 in strings |
The permission to accept extensions means that passing valid input is not proof of strictness: a conforming parser may also swallow things that another conforming parser rejects. Test with invalid cases too, for example those in the json5-tests repository. The syntax and grammar pages walk through the rules.
Relationship to ECMAScript 5.1
The specification does not redefine everything. Its grammar points into ECMAScript 5.1 (ECMA-262, June 2011), a formal standard, for white space (7.2), line terminators (7.3), comments (7.4), identifier names (7.6) and literals (7.8). Its other references include RFC 7159 for JSON (since obsoleted by RFC 8259), RFC 2119, IEEE 754 and the latest version of Unicode, whichever that is at the time.
The intended position is a sandwich: every JSON text is valid JSON5, and every JSON5 text is valid ES5. The README states one exception. JSON and JSON5 allow raw U+2028 and U+2029 inside strings, which ES5 string literals do not. The JSON superset proposal, part of ES2019, removed that difference for later editions. The project's README also states that no feature will ever be added that breaks ES5 compatibility.
"Valid ES5 syntax" is not the same as "means the same thing". Run under Node.js 24 with json5 2.2.3:
import JSON5 from 'json5';
const p = "{ '__proto__': { a: 1 } }";
Object.hasOwn(JSON5.parse(p), '__proto__'); // true: an ordinary key
Object.hasOwn((0, eval)('(' + p + ')'), '__proto__'); // false: sets the prototype
(0, eval)('010'); // 8 in non-strict JavaScript (legacy octal)
JSON5.parse('010'); // SyntaxError: JSON5: invalid character '1' at 1:2The eval calls above exist only to expose the difference; never use eval to read data. The ECMAScript relationship page compares the two grammars further.
The application/json5 Media Type
application/json5 is not registered with IANA. The string "json5" appears nowhere in the registry (data dated November 18, 2026) or in the provisional standards list (dated August 7, 2026). The specification itself defines no media type. Software uses the name anyway, as a convention.
| Software or database | Treatment of .json5 |
|---|---|
| freedesktop.org shared-mime-info | application/json5, "JSON5 document", glob *.json5, subclass of application/ecmascript; application/json is a subclass of it |
mime-db 1.54.0 | Lists application/json5 with extension json5 and no source field (application/json is marked iana) |
mime-types 3.0.2 and mime 4.1.2 (npm) | Both return application/json5 (tested) |
Python 3.14.4 mimetypes on Windows | No type: (None, None) until you add one (tested) |
| nginx default mime.types | No json5 entry |
| Apache httpd mime.types | No json5 entry |
GitHub Linguist | Language "JSON5", type data, extension .json5 (its CodeMirror MIME type is listed as application/json) |
The freedesktop entry has a clear paper trail. Merge request 257 by Alex Henrie, merged on October 29, 2023 and released in version 2.4, said that although application/json5 "is not an official IANA media type, it is used by Nim, Fastify, Altova, and others". Version 2.5 (June 29, 2026) changed its parent type to application/ecmascript, according to the project's release notes.
Serving and reading JSON5 over HTTP
Label it honestly. Sending JSON5 as application/json invites a strict parser to fail. On the client, read the body as text and parse it with a JSON5 library, because response.json() parses strict JSON. This runs as written with json5 2.2.3:
import { createServer } from 'node:http';
import JSON5 from 'json5';
const body = "{ name: 'demo', retries: 3, } // JSON5";
const server = createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json5; charset=utf-8' });
res.end(body);
});
server.listen(0, async () => {
const res = await fetch(`http://127.0.0.1:${server.address().port}/`);
console.log(res.headers.get('content-type')); // application/json5; charset=utf-8
console.log(JSON5.parse(await res.text())); // { name: 'demo', retries: 3 }
server.close();
});Where a toolkit does not know the type, register it yourself:
import mimetypes
mimetypes.add_type("application/json5", ".json5")
print(mimetypes.guess_type("config.json5")) # ('application/json5', None)What registration would take
A name with no prefix such as application/json5 belongs to the standards tree. RFC 6838 says standards tree registrations must either be approved by the IESG for IETF specifications or be made by a recognized standards-related organization. The vendor (vnd.) and personal (prs.) trees have lighter routes but would produce a different name. Community formats can end up with plain names: the registry now lists application/yaml (through RFC 9512) and application/toml (record dated October 21, 2024).
The .json5 File Extension
The conventional extension is .json5. It is not mandated by the 1.0.0 specification, which says nothing about file names. The convention comes from practice: the reference project ships a package.json5, shared-mime-info and mime-db map the extension, Linguist recognizes it, and WebStorm treats .json5 files as JSON5 by default. RFC 8259's registration gives JSON the extension .json.
Two situations need care. Some tools read JSON5 from files with other names, such as Babel's babel.config.json, so the extension does not always reveal the dialect. And a file ending in .json that contains comments or trailing commas will break any strict consumer, whatever the first tool in the chain tolerates.
For opening and associating these files, see what is a .json5 file.
Structured Syntax Suffix: Is There a +json5?
No. The IANA structured syntax suffix registry (dated June 25, 2026) includes +json, +json-seq, +yaml, +xml, +cbor and others, but no +json5. RFC 6838 section 4.2.8 sets three relevant rules:
- Names must not carry the suffix of a structured syntax they do not actually employ.
- Suffix constructs for syntaxes that are not yet registered should not be used, because a later definition could conflict.
- A registrable suffix needs a readily available description, preferably from an established standards-related organization.
| Name you might invent | Assessment |
|---|---|
application/vnd.example+json carrying JSON5 | Wrong. RFC 6839 ties +json to the application/json representation, and generic JSON tools will choke on comments |
application/vnd.example+json5 | Discouraged by RFC 6838 while the suffix is unregistered; generic software gains nothing from it |
application/json5 | Unregistered, but the name existing software recognizes |
If your API's contract needs a registered type, serve converted strict JSON instead.
Open Standardization Discussions
Standardization has been requested several times. None of these threads reports a submission to any body. All quotations below are from the linked GitHub issues.
An Internet standard (spec #33)
In October 2021 a user who had moved business users from JSON and YAML to JSON5 "wanted to suggest that JSON5 will be submitted as internet standard (RFC)". Jordan Tucker replied that there had been a discussion about standardization in json5 issue #190. The issue is open.
Ecma or TC39 versioning (spec #37)
A July 2022 issue asked whether JSON5 could be submitted as a version update to ECMA-404. Tucker: "I am open to contacting Ecma regarding this, however I would like approval from @aseemk before doing so." Aseem Kishore replied in August: "I'm happy to defer to your judgment @jordanbtucker! I have no experience with standards bodies and don't know what to expect here." The issue is open, with no later comment.
Part of JavaScript (spec #43)
In September 2022 another user asked about an ECMAScript proposal for parsing and stringifying JSON5, together with registering application/json5 with IANA. Kishore answered: "From my side: I wouldn't just be open — I'd be very grateful! — to anyone leading the charge here!" He added that he had no experience with standards bodies. The invitation is open.
Earlier maintainer positions (json5 #190)
A long 2019 thread, Should we consolidate the human-readable JSON efforts?, records Tucker's thinking:
| Date | Quotation | Context |
|---|---|---|
| 2019-02-01 | "JSON5 syntax will never go beyond the syntax of ES5." | On why newer JavaScript features are excluded |
| 2019-02-12 | "I don't think we should. JSON has a different use case than JSON5." | On updating RFC 8259 to absorb the idea |
| 2019-02-13 | "It is not codified in an RFC, but neither is YAML or Source Maps." | On whether JSON5 counts as a standard |
| 2019-03-05 | "I'm not aware of any efforts." | On a global JSON5 object in ECMAScript |
Open specification questions
On November 29, 2026 the specification tracker had 16 open issues. Several concern points a formal process would likely have to settle. An open issue changes nothing in version 1.0.0.
| Issue | Question |
|---|---|
| #4 | Recommend RFC 3339 formats for dates in strings |
| #6, #28, #58 | Clarify hexadecimal values, leading and trailing decimal points, and that a leading 0 is illegal |
| #12, #42 | Invalid surrogate pairs; ES2015 \u{...} escapes |
| #24 | Implementation limits on NaN and Infinity |
| #25, #38 | Uniqueness of property names and defined duplicate-key behavior |
| #35, #36 | Recommendations for binary data and BigInt |
| #56 | "Upgrade past ECMAScript 5.1" |
| #33, #37, #43 | The standardization requests above |
| #44 | Gathering parser projects under the json5 organization |
On #58, opened in October 2025 by an implementer, Tucker explained that "Everything in the spec is normative with the exception of the examples, which are informational only, and some recommendations for interoperability." The implementer's complaint, that relying on ECMAScript productions makes completeness hard to judge, is a fair point for anyone writing a parser.
A related naming concern, spec #15, warned that people may take "JSON5" for "the 5th version of the JSON specification". It is not: it has no tie to the bodies that publish JSON. The issue was closed in May 2020.
When a Non-Standard Format Is Acceptable
The useful question is who must agree on the meaning of a file. The more parties you do not control, the more a formal standard matters. The project's README itself says JSON5 is not intended for machine-to-machine communication. The ratings below are this site's advice.
| Situation | Advice |
|---|---|
| Configuration read by your own application | Good fit: you choose and pin the parser |
| A file a tool documents as JSON5 | Good fit: follow that tool's documentation |
| Test fixtures and hand-written examples | Good fit |
| Files shared across several languages | Workable if you test every parser against the same cases |
| Public API requests and responses | Use JSON (RFC 8259) |
| Signed, hashed or archived interchange data | Use JSON or another format your obligations name |
| Contracts or regulation that require recognized standards | Do not use JSON5 in the deliverable; it is not one |
Implementations are not identical
A single specification does not guarantee a single behavior. SQLite documents that its functions understand "almost all of JSON5, plus a little more": a looser rule for unquoted keys, and extra spellings such as Inf, QNaN and SNaN, with the not-a-number forms read as null. It also leaves out +NaN and -NaN. Write files that stay inside the specification and you avoid depending on any one reader's extras. See the implementations directory.
Differences can run the other way too. The specification says parsers should warn about unescaped U+2028 and U+2029 in strings, while the reference library's unreleased changelog removes those warnings on the grounds that libraries should not log to the console. The advice to authors is unchanged: escape both characters.
Convert at the boundary, and fail loudly
Keep JSON5 as the source people edit and emit standard JSON for everything downstream. Watch the non-finite numbers: JSON.stringify silently turns them into null.
import JSON5 from 'json5';
export function toStrictJson(text) {
return JSON.stringify(JSON5.parse(text), (key, value) => {
if (typeof value === 'number' && !Number.isFinite(value)) {
throw new RangeError(`"${key}" is ${value}, which JSON cannot represent`);
}
return value;
}, 2);
}
console.log(toStrictJson("{ port: 0x1F90, ratio: .5, }"));
// {
// "port": 8080,
// "ratio": 0.5
// }
toStrictJson('{ timeout: Infinity }');
// RangeError: "timeout" is Infinity, which JSON cannot represent- Cite the specification version (1.0.0) and your library version in project documentation.
- Pin the parser and read its changelog before major upgrades; the reference library's unreleased 3.0.0 has breaking changes.
- Keep object keys unique and do not rely on duplicate handling.
- Save files as UTF-8, and use the
.json5extension unless a tool requires another name. - Validate the parsed data with a schema; a grammar says nothing about meaning.
Common Questions
Is JSON5 an official standard?
Not from the IETF, Ecma or ISO/IEC. It has a project specification that calls itself "Standard JSON5 1.0.0" and uses RFC 2119 conformance language.
Is there an RFC for JSON5?
No RFC or Internet-Draft with JSON5 in its name or title was found on the IETF Datatracker. RFC 8259 defines JSON only.
What MIME type should I use for JSON5?
application/json5 is the common convention. Document that it is unregistered, and configure servers and libraries that do not know it.
Does the lack of standardization make JSON5 unstable?
The format text has stayed at 1.0.0 since March 2018. What a standards body would add is independent review, a defined change process and a registered identity, not necessarily more stability.
May I reuse or implement the specification freely?
The document is published under the MIT License, which permits copying, modification and distribution provided the copyright and permission notice travel with substantial portions.
Sources
(43)
- The JSON5 Data Interchange Format 1.0.0
- json5-spec commit history
- json5-spec releases
- json5-spec v1.1.0 branch, compared with master
- json5-spec #4, date formats
- json5-spec #44, parser projects
- json5-spec #56, upgrading past ECMAScript 5.1
- json5-tests
- json5-spec issues
- json5-spec #15, confusion with JSON
- json5-spec #33, Internet standard
- json5-spec #37, TC39 versioning proposal
- json5-spec #43, part of ECMAScript
- json5-spec #58, leading zeros
- json5 #190, consolidating human-readable JSON efforts
- json5 README
- json5 CHANGELOG
- RFC 8259: The JSON Data Interchange Format
- RFC 7159
- RFC 4627
- RFC 2119: requirement levels
- RFC 6838: media type registration
- RFC 6839: structured syntax suffixes
- RFC 9512: YAML media type
- ECMA-404
- ISO/IEC 21778:2017
- ECMA-262 Edition 5.1
- TC39 JSON superset proposal
- TC39 proposals
- IETF Datatracker search for json5
- IANA Media Types registry
- IANA provisional standard media types
- IANA structured syntax suffixes
- shared-mime-info merge request 257
- shared-mime-info NEWS
- shared-mime-info database source
- mime-db db.json
- nginx mime.types
- Apache httpd mime.types
- GitHub Linguist languages.yml
- SQLite JSON functions
- WebStorm: JSON
- Babel: Config Files
Last reviewed: November 29, 2026.
JavaScript
Python
TypeScript
Node.js
Rust
Java
C#
Ruby
Kotlin
Lua
Babel
Vite
webpack
ESLint
Prettier
VS Code
JetBrains 
