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
| Feature | JSON | JSON5 |
|---|---|---|
| Comments | No | Yes (// and /* */) |
| Trailing commas | No | Yes |
| Unquoted keys | No | Yes, for identifier-like keys |
| Single-quoted strings | No | Yes |
| Hex numbers / leading decimal points | No | Yes (JSON5 extensions) |
| Typical API interchange | Yes | Rare |
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.
- JSON Explained: Why It Became So Popular
From Douglas Crockford’s minimal syntax to the default language of web APIs—how JSON won, what it forbids, and where it still hurts.
Related guides
- JSON Formatting and Validation: Complete Guide
What strict JSON allows, how pretty-printing works, and how SmartKitio’s formatter behaves.
- Base64 Encoding Explained
How Base64 maps bytes to ASCII, why length grows, and how SmartKitio encodes UTF-8 text.
- Base64 Encoding vs Encryption
Why Base64 is reversible without a key, and what to use when you need confidentiality.
- URL Encoding Explained
Percent-encoding for query values, what encodeURIComponent changes, and common pitfalls.

