JSON Toolkit

JSON5 Converter

Convert between JSON5 and standard JSON with comments, single quotes and trailing commas

JSON5 → JSONSupports comments, single quotes, trailing commas, unquoted keys and hexadecimal numbers
Standard JSON result

Converting between JSON5 and standard JSON

JSON5 extends standard JSON with comments, single-quoted strings, unquoted keys, trailing commas and hexadecimal numbers, which makes it popular for frontend configuration and hand-written data files. This page turns JSON5 into strict JSON for APIs and tools that accept standard JSON only.

The reverse direction prints standard JSON as JSON5-compatible text while keeping keys and quotes conventional, which suits projects that prefer comment-friendly files. The conversion works at the syntax level and never invents comments.

When a syntax error appears, the editor marks its line and column and explains the cause, such as a misplaced trailing comma or an unterminated string. Fix it and run the conversion again; input and output stay in the browser.

Frequently asked questions

Can browsers or backends read JSON5 files directly?
Most built-in parsers accept standard JSON only. Convert to standard JSON on this page before deployment, or perform the conversion during the build step.
Are comments preserved during conversion?
Comments are dropped when producing standard JSON because the format does not support them. The reverse direction does not generate comments either.
What happens to unquoted keys?
Unquoted keys receive double quotes in standard JSON output, while the key text itself stays unchanged.