About this tool
YAML describes the same data as JSON using indentation instead of braces, and it allows comments, which is why it is popular for configuration. Values such as yes, no or on are quoted so that older YAML parsers do not read them as booleans.
JSON to YAML example
YAML describes the same data as JSON using indentation instead of braces and brackets.
{"name":"app","ports":[80,443],"debug":false}
name: app
ports:
- 80
- 443
debug: falseWhere YAML is used
YAML is the usual format for Kubernetes manifests, Docker Compose files, GitHub Actions workflows and OpenAPI specifications. It is easier to read and allows comments, while JSON is stricter and more widely accepted by APIs.
Notes on the output
Values such as yes, no and on are quoted so older YAML parsers do not read them as booleans. JSON has no comments, so none appear in the output. To go the other way, use the YAML to JSON converter.
How to use it
- Paste valid JSON.
- The YAML appears on the right.
- Copy it or download it as a .yaml file.
Frequently asked questions
What is the difference between JSON and YAML?
They represent the same data types. YAML is whitespace-based and supports comments; JSON is stricter and more widely supported by APIs.
Are special values quoted safely?
Yes. Values that could be misread, such as yes, no or numeric-looking text, are quoted when needed.
Can I convert YAML to JSON?
Yes, use the YAML to JSON converter.