Convert JSON to clean YAML — for Kubernetes manifests, CI pipelines, docker-compose and config files. Powered by the audited js-yaml library, entirely in your browser.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
JSON in, config-grade YAML out
The configuration world — Kubernetes manifests, GitHub Actions, docker-compose, Ansible, OpenAPI — runs on YAML, and the data you have is usually JSON. Every JSON document is representable in YAML, so this conversion is lossless: same values, same structure, friendlier syntax. Conversion uses the audited js-yaml library (MIT), bundled locally so your data never leaves the browser.
Worked example
{ "service": "article-api", "replicas": 3,
"env": { "NODE_ENV": "production", "DEBUG": false } }becomes:
service: article-api
replicas: 3
env:
NODE_ENV: production
DEBUG: falseWhen to use it
- Turning an API export or JSON config into a manifest or pipeline file.
- Converting OpenAPI documents between their two accepted formats.
- Making a dense JSON structure readable for a review, then adding YAML comments by hand.
Limitations to know
- Output is deliberately plain YAML — no anchors or aliases are generated (they confuse more than they help in generated files).
- Strings that would be misread as other types (“true”, “2023-01-01”, values with colons) are quoted automatically — that selective quoting is correctness, not inconsistency.
- JSON comments do not exist, so none can be carried over.
Common errors and fixes
- Input rejected — the JSON must parse first; the error names line and column.
- Round-trip check — paste the output into the YAML to JSON Converter and compare with JSON Compare; it should be identical.
How to use the JSON to YAML Converter
- Paste JSON into the input panel.
- Pick the indent width; optionally force-quote all strings.
- Click "Convert to YAML".
- Copy the YAML into your config, manifest or pipeline file — or download it as .yaml.
Frequently asked questions
Why convert JSON to YAML?
The config world — Kubernetes, GitHub Actions, docker-compose, Ansible, OpenAPI — speaks YAML. Since every JSON document is representable in YAML, converting is lossless: same data, human-friendlier syntax with comments possible afterwards.
Why are some strings quoted in the output and others not?
YAML only needs quotes when a bare value would be misread — "true", "2023-01-01", strings with colons or leading special characters. The converter quotes exactly where required, which is why the output looks selectively quoted. Force-quoting everything is an option if your team prefers it.
Which YAML features will never appear in the output?
Anchors, aliases and custom tags — the converter emits plain, portable YAML (noRefs), because generated anchors confuse more than they help. Comments cannot appear either; JSON has none to carry over.
What library does the conversion?
js-yaml (MIT license), a widely-used audited library, bundled locally and running only in your browser — the YAML never leaves your machine.