JSON5 and JSONC are relaxed supersets of JSON that let you write comments, trailing commas, single-quoted strings, unquoted keys and hex numbers — the conveniences you get in a tsconfig.json, a VS Code settings file or a Babel config. This tool parses that relaxed syntax and converts it into strict, standards-compliant JSON that any parser, API or language will accept.
It runs entirely in your browser. Your config never leaves your machine — there is no upload, no server round-trip and no logging, so it is safe for private configs, secrets-adjacent files and internal tooling. Turn off your network and it still converts.
It is built for developers who keep hitting 'Unexpected token' when they feed a commented config to a strict JSON parser. Paste your JSON5 or JSONC, pick your indentation, and copy clean JSON out. Free forever, no signup, no file-size gate.
Both // line comments and /* block */ comments are recognised and removed. JSON has no concept of comments, so the converter drops them entirely rather than trying to preserve them — the output is pure data, exactly what a strict RFC 8259 parser expects.
Trailing commas after the last array element or object property are removed. Single-quoted strings become double-quoted, and unquoted ECMAScript-identifier keys like { name: 1 } are wrapped in quotes. The result is syntactically strict JSON with identical data.
Hexadecimal literals like 0x1F become their decimal value (31), and loose forms such as .5 or 5. are normalised to 0.5 and 5. JSON cannot represent hex or leading/trailing dots, so each number is emitted in canonical JSON form.
Malformed input reports the first syntax error with its line and column so you can jump straight to the problem. Infinity and NaN are valid JSON5 but have no JSON representation, so they are flagged as an error rather than silently corrupted.
JSONC ('JSON with Comments') is JSON plus // and /* */ comments and trailing commas — the format VS Code uses for settings and tsconfig.json. JSON5 goes further, adding single quotes, unquoted keys, hex numbers and more. This tool accepts both and outputs strict JSON.
Yes. Those files are JSONC — they contain comments and trailing commas that strict JSON parsers reject. Paste the file here and you get clean JSON that any standard parser will accept.
No. The conversion runs entirely in your browser with JavaScript. Nothing is uploaded, logged or sent to a server, so it is safe for private configuration files. It even works offline.
JSON5 allows Infinity and NaN as numbers, but the JSON specification has no way to represent them. Rather than silently emit invalid or misleading output, the converter reports them as an error with the exact position.
No — standard JSON does not support comments, so they are removed. The output contains only the data. If you need to keep annotations, keep the original JSON5/JSONC file as your source of truth.