What it does
The JSON to YAML Converter turns JSON into clean, readable YAML, and converts YAML back to JSON. It is made for configuration: Kubernetes manifests, Docker Compose files, GitHub Actions and other CI pipelines, OpenAPI specs and app settings.
How to use it
- Paste JSON, open a file, or click Load sample.
- Choose 2 spaces or 4 spaces.
- Copy or download the YAML.
- Click Swap direction to convert YAML to JSON instead.
Example
{
"app": { "name": "InTab", "version": "1.0.0", "debug": false },
"servers": [
{ "host": "alpha.local", "port": 8080 },
{ "host": "beta.local", "port": 8081 }
]
}
As YAML:
app:
name: InTab
version: 1.0.0
debug: false
servers:
- host: alpha.local
port: 8080
- host: beta.local
port: 8081
Good to know
- Strings that look like numbers, dates or booleans are quoted in the YAML output, so their type does not change when the file is read back.
- Long strings stay on one line.
- The same page also converts XML, CSV and TOML: choose them in the From and To lists.
FAQ
Is YAML a superset of JSON? Yes, almost all JSON is valid YAML. Converting still helps, because block-style YAML is far easier to read and review.
Why are my comments gone after converting YAML to JSON? JSON has no comments, so there is nowhere to keep them.