Convert JSON to clean, readable YAML for Kubernetes, Docker Compose, GitHub Actions or OpenAPI
Turn JSON into readable YAML for Kubernetes, Compose, CI pipelines or OpenAPI specs. Switch direction to go back.
How to use it
Paste JSON on the left, or open a .json file. Choose 2 or 4 spaces for the YAML indent. Copy or download the YAML. Use "Swap" to edit the YAML and convert it back.
Example
API config to YAML
{"server": {"port": 8080, "hosts": ["a.example.com", "b.example.com"]}, "debug": false}server:
port: 8080
hosts:
- a.example.com
- b.example.com
debug: falseHow values are written
Questions
- Is all JSON valid YAML?
Practically yes: YAML 1.2 is a superset of JSON, so a YAML parser can read JSON. Converting makes it readable: block style, no braces, no quotes where they are not needed. - Will comments survive?
JSON has no comments, so there are none to keep. When converting YAML to JSON , comments are dropped because JSON cannot hold them. - Is my config uploaded?
No. Everything runs in your browser, so your config stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first. Kubernetes manifests, CI files and .env-style configs often hold secrets, and the page warns you if it spots any.