About the JSON to YAML
YAML 1.2 is a superset of JSON, so every JSON document has an exact YAML equivalent. The output uses block style with two-space indentation, the format expected by Kubernetes manifests, Docker Compose, GitHub Actions workflows and OpenAPI specs. Long strings are not folded.
Strings are quoted only when they would otherwise be read as another type or break the syntax. "yes", "on", "1.0", "null" and strings starting with * or & keep their quotes, which avoids the well-known YAML 1.1 “Norway problem” where NO turns into false. Multi-line strings are written as literal | blocks.
Conversion uses the js-yaml library loaded from this site and runs in your browser. Key order is preserved. JSON has no comments, so there are none to carry over.
Example: {"ports": [{"name": "http", "port": 8080}]} becomes a ports: key followed by a list item - name: http with port: 8080 indented under it. Empty arrays and objects are written as [] and {} in flow style, and null stays null.
How to use it
- Paste JSON or open a .json file.
- Check the YAML in the output pane.
- Copy it or download converted.yaml.