All Articles
JSON & APIs·5 min read·October 2, 2026

JSON vs JSON5 vs JSONC: Adding Comments to Configuration Files

Explore JSON extensions like JSONC and JSON5 that allow comments and trailing commas, and where they are used in developer tooling.

TBy Toolstack Engineering
Recommended Free Tool

Try Toolstack's JSON Validator

Free, instantaneous, and processes 100% locally in your browser.

Open JSON Validator

Why does standard JSON not support comments? Douglas Crockford famously stated: "I removed comments from JSON because I saw people using them to hold parsing directives, a practice which would have destroyed interoperability."

JSONC (JSON with Comments)

Used heavily in VS Code (`settings.json`, `tsconfig.json`). Supports single-line `//` comments and multi-line `/* */` comments, but remains otherwise identical to standard JSON.

JSON5

An official superset designed for humans. Supports comments, trailing commas, single-quoted strings, unquoted identifier keys, and hex numbers (`0xdecaf`). Ideal for project configuration files.

Tags:#JSONC#JSON5#VS Code#Configuration

More Guides in JSON & APIs