JSON with comments to JSON
Remove JSONC comments and trailing commas while preserving every original JSON number token.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Paste a commented configuration or select one UTF-8 file, then download strict JSON and its conversion report.
How to use this tool
- Paste JSONC or select your original UTF-8 configuration.
- Convert and review the removed-comment and trailing-comma counts.
- Download converted.json and conversion-report.json.
- Open the JSON in the intended application and check its numeric handling.
Supported inputs and limits
Paste up to 1 MiB or select one UTF-8 file up to 2 MiB; a selected file takes priority over pasted text. One leading UTF-8 BOM is removed and recorded.
Accept standard JSON values with // line comments, /* block comments */ and trailing commas. JSON5 single quotes, unquoted keys, hexadecimal numbers, NaN, Infinity and executable expressions are rejected.
Reject malformed syntax and duplicate decoded keys in each object. No missing comma, broken string or invalid escape is automatically repaired.
At most 128 nested containers and 200,000 non-comment syntax tokens. Strict JSON is limited to 4 MiB; accepted source limits dominate that output guard.
Original numeric tokens, including large integers, decimal exponents and negative zero, stay byte-for-byte in the output. A consuming application may still round them; choose a reader with suitable precision.
The compact result omits comments, whitespace and trailing commas. Keys, strings, array order and number spellings are retained; this is syntax conversion, not configuration validation. Files and contents stay in this browser.
The screen previews the first 4,000 characters; copy and download keep the complete result.
Worked example
Example input
{"url":"https://example.org/a//b",/* note */"id":9007199254740993,"items":[1,2,],}Example options
{}Example output
{"url":"https://example.org/a//b","id":9007199254740993,"items":[1,2]}When something does not work
Correct the indicated syntax, use double-quoted keys and strings, and remove duplicate keys. Select a supported UTF-8 file or clear the file selection to use pasted input.
Frequently asked questions
Will a large numeric identifier be rounded?
The converter keeps its original JSON number spelling. The application that reads the download may use binary floating point and round it; store identifiers as strings when the receiving format allows.
Does it accept all JSON5 files?
No. The supported dialect is JSONC: standard JSON with C-style comments and trailing commas. Other JSON5 features are rejected.