How to use YAML to JSON
- 1. Paste YAML. Indentation matters. Keep spaces, not tabs.
- 2. Leave source as YAML and target as JSON. Preselected on this URL.
- 3. Copy JSON. Validate it in the JSON formatter if you need stricter errors.
About this tool
Teams search “yaml to json” when a values.yaml must become an API body or a ConfigMap snippet. This is that pair on the YAML ↔ JSON ↔ TOML tool, with the dropdowns already set.
Comments and anchors
JSON cannot store YAML comments. Anchors and merge keys may flatten. If you need comments back, keep the YAML original in git and treat JSON as a build artifact.
JSON is not a YAML superset in reverse
Going YAML → JSON is the lossy direction. JSON → YAML can re-emit maps cleanly, but you will not recover comments you already discarded.
Code examples
Node
import { parse } from "yaml";
parse("name: Ada");