Convert JSONC to JSON
Turn JSONC files into JSON. Comments and trailing commas are removed and everything else is kept in its order, including comment-like text inside strings.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop JSONC files on the dialor turn it to pick what to do
JSONC becomes plain JSON.Comments and trailing commas are removed. Everything else stays in order.
What you get
One JSON file with the same content as your JSONC file. The keys and values keep the order they had in the source.
Only the comments and the trailing commas are removed. Nothing else is changed.
Text that looks like a comment
Comment-like text inside a string is part of the value, so it stays. A string that holds a URL with two slashes, for example, is not cut short.
When it fails
If the file cannot be parsed, the conversion stops with
input_corrupted. The conversion has no options to set.To go the other way, use JSON to JSONC.
JSONC and JSON.What each format is.
The formats
JSON with Comments
JSON that allows comments, as in editor and TypeScript configuration files.
- Extensions
- .jsonc
- MIME type
- text
/x -jsonc - Kind
- Text and data
JSON
JSON, the data format of every API.
- Extensions
- .json
- MIME type
- application
/json - Kind
- Text and data
In your code.The same JSONC to JSON conversion through the API, for your app or your agent.
$ cv convert report.jsonc report.json$ cv convert report.jsonc report.jsonQuestions.What people ask about JSONC to JSON.
Yes. Comments and trailing commas are removed, and everything else is kept in its order.
No. Text inside strings that looks like a comment is kept as it is.
No. Everything that is kept stays in its original order.
The file could not be parsed. The conversion stops and no JSON file is made.