SmartKitio

Developer topics · Updated 2026-10-04

JSON vs JSON5: What's the Difference?

JSON5 is a superset designed to make hand-written config less fussy. Strict JSON remains the interchange format for APIs and most tooling. Knowing the gap prevents “it works in my editor” surprises.

Side-by-side

JSON vs JSON5 features

FeatureJSONJSON5
CommentsNoYes (// and /* */)
Trailing commasNoYes
Unquoted keysNoYes, for identifier-like keys
Single-quoted stringsNoYes
Hex numbers / leading decimal pointsNoYes (JSON5 extensions)
Typical API interchangeYesRare

Example that is JSON5 only

What to ship

Use JSON5 or similar relaxed syntax in human-edited local config if your toolchain supports it. Serialize over the network and into logs as strict JSON so every consumer agrees.

SmartKitio’s JSON Formatter and Validator use the browser’s strict JSON parser. They will not accept JSON5 conveniences; convert or strip them before pasting.

Try these SmartKitio tools

Use a tool when you want a result; keep this guide open when you want the method.

Browse family: Developer Tools

Related articles

Broader reading that connects to this guide—when the topic deserves more than a how-to.

Related guides