JSON vs YAML
| JSON | YAML |
|---|---|
{"port": 8080} | port: 8080 |
{"hosts": ["a", "b"]} | hosts: |
Every valid JSON document can be expressed in YAML. The converter uses the js-yaml library, keeps long strings on one line and quotes values only where YAML requires it (for example "yes", "no" or strings that look like numbers).
Common uses
- Kubernetes and Helm manifests
- Docker Compose files
- GitHub Actions and GitLab CI pipelines
- OpenAPI specifications
Convert YAML back with the YAML to JSON Converter.
Frequently asked questions
Is YAML a superset of JSON?
YAML 1.2 is a superset of JSON, so YAML parsers can read JSON too.
Why are some strings quoted in the output?
Values like "yes", "on" or "1.0" would change meaning without quotes, so they are kept as strings.
Does the conversion happen online?
It runs in your browser; nothing is uploaded.

