JSON to JSON5
Convert strict JSON into JSON5 — a superset that allows unquoted keys, single-quoted strings, trailing commas, and comments. Output uses the official json5 library's stringify with 2-space indent.
JSON in, JSON5 out
See exactly how JSON maps onto JSON5 — the converter on this page produces output identical to the example below.
{
"name": "hcodx",
"version": "1.0.0",
"tags": ["dev", "tools"],
"config": { "debug": true, "timeout": 5000 }
}{
"name": "hcodx",
"version": "1.0.0",
"tags": [
"dev",
"tools"
],
"config": {
"debug": true,
"timeout": 5000
}
}What you'll use this for
Converting JSON to JSON5 is a daily task in API integration, config management, and data pipelines.
API integration
Generate JSON5 config files from JSON-based service responses.
Config migration
Move from JSON to a more comment-friendly JSON5 for human editing.
Data import
Hand-edit JSON5 configs, then strip comments for downstream JSON consumers.
CI pipelines
Author tool configs in JSON5, serialize to strict JSON during builds.
How to convert JSON to JSON5
Paste your JSON
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.json5.
Reverse if needed
Jump to the JSON5 to JSON converter for a round-trip check.
Frequently asked questions
Yes. JSON5 supports the same types as JSON, plus extras like Infinity, NaN, and hexadecimal numbers.
They're emitted verbatim with the same nesting structure as the JSON input.
Yes. No signup, no limits.
You'll see a clear parse error in the output panel.
Use the JSON5 to JSON converter for strict JSON output.
About JSON and JSON5
JSON5 extends JSON with developer-friendly syntax: comments, trailing commas, unquoted identifier keys, single-quoted strings, and more lenient numbers. It's used by tools like Babel, Webpack, and many editors' config files.
Common pitfalls
- JSON5 isn't a network format — it's for human-edited config.
- Most JSON parsers reject JSON5 — use the
json5library at runtime. - Conversions are lossless from JSON to JSON5; the reverse may drop comments.