Use JSON5 Formatter & Validator
Validate JSON5 comments, unquoted keys and trailing commas, then export strict JSON. Start with the sample, select the options and run the tool. Copy or download the result after reviewing it.
Behavior and limits
The output uses strict JSON with two-space indentation. Comments and numeric spelling are normalized. Numbers that would silently change, Infinity and NaN are rejected; quote them to preserve text. Duplicate object keys use JSON5 last-value semantics.
Example input
// Example configuration
{user: 'Ada', enabled: true, ports: [8080, 8081,],}
Expected behavior for the example
A JSON object with quoted keys, user "Ada", enabled true and two ports.
Check important output in the application that will consume it. Use the tool directory to find related formats and tasks.
Frequently asked questions
How does JSON5 Formatter & Validator handle my input?
The output uses strict JSON with two-space indentation. Comments and numeric spelling are normalized. Numbers that would silently change, Infinity and NaN are rejected; quote them to preserve text. Duplicate object keys use JSON5 last-value semantics.
Is my input uploaded or saved automatically?
Processing runs locally in this browser. Input and results are not saved automatically. Downloads happen only when you choose them. The static preview blocks scripts and external resources when one is available.