JSON5 to JSON
Convert JSON5 into strict JSON. Comments are dropped, single-quoted strings become double-quoted, trailing commas are removed, unquoted keys are quoted. Uses the official json5 reference parser.
JSON5 in, JSON out
See exactly how JSON5 maps onto JSON — the converter on this page produces output identical to the example below.
{
// JSON5 sample
name: 'hcodx',
tags: ['dev', 'tools',],
version: 1.0,
config: { debug: true, },
}{
"name": "hcodx",
"tags": ["dev", "tools"],
"version": 1,
"config": { "debug": true }
}What you'll use this for
Converting JSON5 to JSON is a daily task in API integration, config management, and data pipelines.
API integration
Strip comments before sending JSON5 configs to APIs that only accept strict JSON.
Config migration
Convert developer-friendly JSON5 to wire-format JSON for production.
Data import
Normalize hand-edited JSON5 fixtures into strict JSON for parsers that don't support comments.
CI pipelines
Author readable JSON5 in repo, emit minimal JSON for deployment.
How to convert JSON5 to JSON
Paste your JSON5
Drop it into the left editor. The sample is loaded by default — clear it or click the wand to reload.
Click Convert
Or leave auto-convert on for live updates. Conversion runs entirely in your browser — no upload.
Copy or download
Copy to clipboard or save the output as data.json.
Reverse if needed
Jump to the JSON to JSON5 converter for a round-trip check.
Frequently asked questions
Numbers, strings, booleans, null, arrays, and objects all round-trip cleanly. JSON5's Infinity/NaN can't be represented in JSON.
They're preserved verbatim — the converter only changes syntax, not structure.
Yes. No signup, no limits.
You'll see a clear parse error in the output panel.
Use the JSON to JSON5 converter for the opposite direction.
About JSON5 and JSON
JSON5 is a superset of JSON that adds developer ergonomics: comments, trailing commas, unquoted keys, single quotes, hex/Infinity/NaN numbers, and multiline strings. Strict JSON (defined by RFC 8259) doesn't support any of those.
Common pitfalls
- Comments are silently dropped — JSON has no comment syntax.
InfinityandNaNcan't be represented and will raise an error.- The reverse direction is lossless from the JSON5 grammar perspective.