JSONJSON5JSONCconfiguration

What Is the Difference Between JSON, JSON5, and JSONC?

JSON is strict data interchange, JSONC adds comments mainly for config files, and JSON5 allows more JavaScript-like syntax.

Published July 2, 2026 · 7 min read

JSON, JSONC, and JSON5 look similar, but they are not interchangeable. Mixing them is a common cause of parser errors.

{
  // JSONC / JSON5 allow comments in some tools
  name: 'ToolGarden',
  tags: ['json', 'tools'],
}

Core Differences

FormatStandard JSON?Main trait
JSONYesStrict and widely supported for APIs and data exchange
JSONCNoCommon for config files, allows comments, stays close to JSON
JSON5NoMore JavaScript-like, allows single quotes, trailing commas, unquoted keys, and more

Which One Should You Use?

  • For API requests and responses, use standard JSON.
  • For human-maintained config files, JSONC can work when the toolchain supports it.
  • For JavaScript-like authoring convenience, JSON5 can be useful but is not accepted by ordinary JSON APIs.
  • Before sending data to a backend, database, or third-party system, convert to standard JSON.