Validate & Format · Runs in your browser
JSONC & JSON5 to JSON
Convert JSON with comments (tsconfig.json, VS Code settings, devcontainer.json) or JSON5 into strict JSON that any parser accepts.
JSONC / JSON5
Drop a file to load it
JSON
How to use it
- Paste a JSONC or JSON5 file, or upload it.
- Choose whether to keep your formatting or re-indent the output.
- Copy or download the strict JSON.
JSONC
JSON with Comments allows // and /* */ comments and trailing commas. Both are removed; everything else is left as you wrote it.
JSON5
With “Allow JSON5 syntax” on, unquoted keys, single-quoted strings, hexadecimal numbers, numbers like .5, 5. and +1, and multi-line strings are converted too. Infinity and NaN have no JSON equivalent, so they become null and are listed as changes.
Why convert?
JSON.parse, most APIs and many tools reject comments. Converting lets you reuse a commented config file anywhere strict JSON is required.
More validate & format tools
All free, all private, all running locally in your browser.
JSON ValidatorFind and pinpoint syntax errorsJSON FormatterIndent JSON with spaces or tabsJSON MinifierShrink JSON by removing whitespaceJSON Pretty PrintMake one-line JSON readableSort JSON KeysOrder keys alphabeticallyJSON RepairFix broken or AI-generated JSONJSON Error AnalyzerExplain why JSON won’t parse