Paste a block-style YAML config and get indented JSON with nested mappings and lists preserved. Anchors, aliases, tags and multi-document files are not supported, so expand those first.
When to use this
Use when: feeding YAML configs into tools that need JSON (most JavaScript / TypeScript / Node.js libs), exporting Kubernetes / Helm values.yaml to JSON for inspection, converting Docker Compose YAML to JSON for inclusion in another JSON-based tool, debugging YAML by viewing the JSON equivalent.
Frequently Asked Questions
Does it expand YAML anchors and aliases?
No. Anchors (&name) and aliases (*name) are not supported, so expand them by hand (copy the anchored block wherever the alias is used) before converting.
What about YAML's tag system (!!int, !!str, !tag)?
Tags are not read: a value such as !!int 5 comes through as the text "!!int 5". Remove tags before converting; plain numbers, booleans and null are typed without them.
Powered by Data Converter - JSON / XML / CSV / YAML.