Convert JSON5 to JSON

Turn JSON5 files into JSON. Comments are dropped, keys are quoted, and hexadecimal, leading-dot and plus-signed numbers become plain numbers, while Infinity and NaN become null.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop JSON5 files on the dialor turn it to pick what to do

JSON5 becomes plain JSON.Comments go, keys get quotes, and special numbers become plain ones.

  1. What you get

    One JSON file with the same data as your JSON5 file. Key order is kept, so the keys appear in the order you wrote them.

    Keys that were unquoted now have quotes, as JSON requires.

  2. What changes

    Comments are dropped, because JSON has no place for them.

    Hexadecimal numbers, numbers that start with a dot and numbers with a plus sign become plain numbers. JSON cannot hold Infinity or NaN, so both become null.

  3. When it fails

    If the file cannot be parsed, the conversion stops with input_corrupted. The conversion has no options, so there is nothing to set.

    To go the other way, use JSON to JSON5.

JSON5 and JSON.What each format is.

The formats

From · JSON5

JSON5

JSON with comments, trailing commas and unquoted keys.

Extensions
.json5
MIME type
application/json5
Kind
Text and data
To · JSON

JSON

JSON, the data format of every API.

Extensions
.json
MIME type
application/json
Kind
Text and data

In your code.The same JSON5 to JSON conversion through the API, for your app or your agent.

terminal
$ cv convert report.json5 report.json
$ cv convert report.json5 report.json

Questions.What people ask about JSON5 to JSON.

01OF 04

No. Comments are dropped from the JSON file.

No. Key order is kept.

Both become null, since JSON has no way to write them.

The file could not be parsed. The conversion stops with input_corrupted in that case.

More conversions.Other ways in and out of JSON5 and JSON.