JSON5 parser online

Processed locally
app.json5.view

You can also load data via #data={"name":"Ada"} or #url=... It is cleared from the address bar after it is read.

JSON5 is a looser superset for writing config: comments, trailing commas, single quotes, and unquoted keys are allowed. This page parses it and outputs standard JSON for APIs and other tools. Content copied from VS Code, webpack config, or a handwritten JS object often cannot be passed straight to JSON.parse . Run it through this page first.

Comments are accepted

Single-line // and multi-line /* */ are dropped; only data remains. Keep important notes in a README. Do not expect comments to survive in standard JSON.

Fits the step from “config people read” to “JSON programs parse.”

Trailing commas

A comma after the last item in an object or array no longer fails parse. That is the most common error when copying a JS / TS object literal.

Converted output does not keep trailing commas, which matches RFC 8259.

Output is still standard JSON

The result can be used by JSON.parse and most backends directly. Keys get double quotes; single-quoted strings become double-quoted.

After conversion you can format, validate, or generate a Schema.

Example

JSON5 input
{
  // 功能开关
  name: 'json5',
  enabled: true,
  tags: ['a', 'b',],
}
Standard JSON
{
  "name": "json5",
  "enabled": true,
  "tags": [
    "a",
    "b"
  ]
}
Are comments kept?

No. Standard JSON has no comments, so they are discarded after conversion.

Is this the same as JSONC?

JSONC usually only adds comments. JSON5 also relaxes keys, quotes, and number syntax. This page parses JSON5 rules.

Are Infinity / NaN supported?

JSON5 allows those number forms. After conversion to standard JSON, whether downstream accepts them depends on the parser—spot-check.

Is this a full JS executor?

No. It only parses data literals. It does not run functions or evaluate expressions.

Recommended workflow

  1. Copy a snippet with comments and trailing commas from a config file or code.
  2. Paste it here and confirm the right-hand output is standard JSON that JSON.parse can parse.
  3. Copy the result to an API, a test fixture, or another tool page.
  4. If people still need to edit it and keep comments, consider YAML instead of forcing JSON.

JSON5 is for “humans write it, then normalize before machines read it.” Public APIs should still accept only standard JSON so clients do not each invent a superset.