{ }jsonkit
Tools/Convert/JSON5 / JSONC to JSON
Search tools…⌘K
Format
{ }JSON Formatter
≡→JSON Minifier
\"JSON Escape / Unescape
a→zJSON Sorter
⇄{}JSON Flattener
Validate
JSON Validator
±JSON Diff / Compare
§JSON Schema Generator
JWT Decoder
ΔJSON Patch / Merge Patch
kbJSON Size Analyzer
Convert
→csvJSON to CSV
csv→CSV to JSON
⇄ymlJSON ⇄ YAML
⇄xmlJSON ⇄ XML
→tsJSON to TypeScript
b64Base64 Encode / Decode
%2FURL Encode / Decode
clkTimestamp Converter
→zJSON to Zod
→pyJSON to Pydantic
→goJSON to Go
→javaJSON to Java
⇄jsonlJSON ⇄ JSONL
5→JSON5 / JSONC to JSON
Query
$.JSONPath / JQ Tester
.*Regex Tester
Generate
Mock JSON Data Generator
idUUID / NanoID Generator
#Hash Generator
5→

JSON5 / JSONC to JSON Converter

Strip comments and trailing commas — get strict JSON.
processes as you type · client-side
Sample
Upload
Indent
24
⧉ Copy output ⌘C
Download
Share
Clear
JSON5 / JSONC237 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12
JSON
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "name": "JsonKit", "version": 1, "flags": 255, "ratio": 0.75, "paths": { "@/*": [ "./src/*" ] }, "tags": [ "json5", "jsonc", "config" ] }
✓ valid (RFC 8259)237 B → 181 B0.0 msLn 1, Col 1UTF-8

About JSON5 / JSONC to JSON

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.

How it works

Comments are stripped

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, single quotes and unquoted keys are normalised

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.

Hex and loose numbers are converted

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.

Precise errors, and honest limits

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.

Frequently asked questions

What is the difference between JSON5 and JSONC?

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.

Can I convert my tsconfig.json or VS Code settings.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.

Is my config uploaded anywhere?

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.

Why does Infinity or NaN cause an error?

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.

Do comments survive the conversion?

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.