JSON5 Formatter

Paste JSON5 on the left — with comments, trailing commas, unquoted keys, single quotes, and more — and get standard, pretty-printed JSON on the right. Runs entirely in your browser; nothing is uploaded.

100% Client-Side Instant No uploadYour data never leaves your browser
✓ Valid JSON5 — converted to standard JSON on the right

How to use this tool

Paste your JSON5 document into the input on the left. JSON5 is a superset of JSON, so plain JSON will also work.

The right pane shows the same data converted to strict, pretty-printed JSON (RFC 8259) — what a standard JSON parser would produce.

Use this to validate that your JSON5 is syntactically correct, to strip JSON5-only features for a consumer that expects standard JSON, or to understand what a JSON5 document actually represents.

JSON5 features supported: // line comments, /* block comments */, trailing commas, unquoted object keys, single-quoted strings, hexadecimal numbers, leading/trailing decimal points, Infinity, -Infinity, NaN, and +NaN.

All parsing happens locally in your browser. Your JSON5 never leaves your device.

Frequently asked questions

What is JSON5?

JSON5 is a superset of JSON designed to make hand-authored configuration files easier to write. It allows comments, trailing commas, unquoted keys, single-quoted strings, hexadecimal numbers, and the special values Infinity, NaN, and -Infinity. It is a separate specification from JSON (RFC 8259), and not all JSON parsers accept it.

Is JSON5 the same as JSON with comments (JSONC)?

No. JSONC only adds comments to standard JSON — it still requires quoted keys and rejects trailing commas. JSON5 is a broader extension that also allows unquoted keys, single quotes, trailing commas, hex numbers, and more. This tool accepts full JSON5; for comment-only input either JSON5 or our JSONC validator will work.

Will standard JSON parsers accept my JSON5?

Not necessarily. Anything that uses strict JSON.parse — most production JSON consumers — will reject JSON5 features like comments and trailing commas. This tool converts your JSON5 into strict JSON so you can see exactly what a standard parser will accept.

Is my data uploaded?

No. Parsing happens entirely in your browser using the json5 library. Nothing is sent to a server.

Why would I use JSON5 instead of JSON?

JSON5 shines for human-authored config files where comments and a more relaxed syntax improve maintainability. For machine-to-machine data exchange, standard JSON remains the safer choice because of its universal parser support.

Related tools