Converts JSON to YAML 1.2 in block style. Strings that a YAML parser could read as another type —yes, no, on, off, null, 0123, 1.10 or dates— are quoted so the data does not change when read back, with both YAML 1.2 and legacy 1.1 parsers.
Numbers are copied as written in the JSON and you are warned when they are large enough for another parser to round them.
How to use it
- Paste the JSON.
- Press Run.
- Review the warnings and download the .yaml file.
Example
{"service":"api","replicas":3,"debug":false,"country":"NO","version":"1.10","env":{"LOG_LEVEL":"info","FEATURE_X":"yes"}} service: api
replicas: 3
debug: false
country: "NO"
version: "1.10"
env:
LOG_LEVEL: info
FEATURE_X: "yes"
Limitations
- It does not generate anchors, aliases or comments.
- JSON with duplicate keys is rejected because YAML 1.2 forbids them.
- Multiline strings are written double-quoted with \n instead of literal | blocks.
FAQ
- Why is "NO" quoted?
- Because YAML 1.1 reads NO as false (the well-known “Norway problem”). Quoting it guarantees it stays text.
- Is the result valid for Kubernetes or Docker Compose?
- It is valid YAML equivalent to your JSON, but the tool does not validate those platforms’ schemas.