Dad’s Data formats tools

JSONC → JSON

Strip comments and trailing commas from JSONC to produce valid RFC 8259 JSON. Used for VS Code settings, tsconfig.json, and other JSONC files.

JSONC Input
JSON Output

JSON output will appear here

Paste JSONC in the input panel to strip comments and trailing commas.

What is JSONC?

JSONC (JSON with Comments) is an informal extension of strict JSON that adds two comment syntaxes borrowed from JavaScript: // single-line comments and /* … */ block comments. It also permits trailing commas in objects and arrays. Strict JSON (RFC 8259) allows neither — most JSON parsers will reject them.

Input
{
  // Server configuration
  /* The port must be free */
  "host": "localhost",
  "port": 3000,
  "features": [
    "auth",
    "logging",  // trailing comma OK
  ],
}
Output
{
  "host": "localhost",
  "port": 3000,
  "features": [
    "auth",
    "logging"
  ]
}

Common JSONC file formats

FileTool / EcosystemWhat JSONC enables
settings.jsonVS CodeDocumenting each setting inline
tsconfig.jsonTypeScriptExplaining compiler options
.eslintrc.jsonESLint (older format)Rule rationale comments
devcontainer.jsonDev ContainersSetup step documentation
launch.jsonVS Code debuggerDebug configuration notes
.babelrcBabel (legacy)Transform explanation comments
Note: JSONC is supported natively by VS Code, TypeScript's ts-node, and several build tools. When passing JSONC to tools that expect strict JSON (APIs, databases, CI pipelines), strip it first using this converter.

JSONC vs JSON5 vs JSON

FeatureJSONJSONCJSON5
Comments✗✓✓
Trailing commas✗✓✓
Single-quoted strings✗✗✓
Unquoted keys✗✗✓
Multi-line strings✗✗✓
Hex numbers✗✗✓
Leading/trailing decimal✗✗✓
Warning: This tool targets JSONC specifically — comments and trailing commas only. If your input uses single-quoted strings, unquoted keys, or other JSON5 extensions, use the JSON Fixer instead, which handles a broader set of non-standard syntax.

Frequently Asked Questions

Your files stay on your computer. Dad promised.

Data formats tools

Search the Data formats tools