JSONC Validator
Paste JSON with comments (JSONC) on the left — the format used by VS Code settings, tsconfig.json, ESLint configs, and more — and get the validated, comment-stripped standard JSON on the right. Runs entirely in your browser.
How to use this tool
Paste your JSONC document into the input on the left. JSONC is standard JSON plus // line comments and /* block comments */.
The right pane shows the same data with comments stripped, validated, and pretty-printed as strict JSON.
Useful for validating tsconfig.json, VS Code settings, or any other JSONC config before feeding it to a tool that expects plain JSON.
Note: JSONC allows comments only. Unquoted keys, single quotes, and trailing commas are NOT valid JSONC (they are JSON5 features) — use the JSON5 Formatter for those.
All processing is local. Your JSONC is never uploaded.
Frequently asked questions
What is JSONC?
JSONC ("JSON with Comments") is standard JSON that additionally allows // line comments and /* block comments */. It is the format used by VS Code settings files, tsconfig.json, ESLint configs, and many other developer-facing configuration files. It is more permissive than JSON but less permissive than JSON5.
Does JSONC support trailing commas or unquoted keys?
Strictly speaking, no — those are JSON5 features. Some tools (notably older versions of VS Code) tolerated trailing commas in JSONC, but the safest interpretation is that JSONC = JSON + comments only. This validator follows the strict definition: comments are stripped, but unquoted keys and trailing commas will produce an error. Use the JSON5 Formatter if you need those features.
Why does my tsconfig.json have comments but tsc accepts it?
Because the TypeScript compiler uses its own lenient JSONC parser that allows comments (and, in practice, trailing commas). Standard JSON.parse rejects both. This tool gives you the strict-JSON view of your JSONC so you can see what a non-Tolerant consumer would produce.
Is my data uploaded?
No. Comment stripping and JSON parsing both happen in your browser. Nothing is sent to a server.
How is this different from the JSON Validator?
The JSON Validator enforces strict RFC 8259 JSON and will flag comments as errors. This JSONC validator accepts comments and produces the comment-free standard JSON equivalent. Pick based on whether your input is meant to be plain JSON or JSONC.