Skip to content

YAML to JSON Converter

YAML config files are readable but downstream tools often need JSON. Convert any valid YAML (1.1 or 1.2) to clean, properly-typed JSON. Handles anchors (&) and aliases (*), multi-line block scalars, flow-style sequences, and nested mappings. Output is properly typed - numbers stay numbers, booleans stay booleans, strings stay strings.

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?

Yes - anchors (&name) and aliases (*name) are fully expanded in the JSON output, since JSON doesn't have a native reference mechanism. The output JSON has the values duplicated wherever the alias was used in the source YAML.

What about YAML's tag system (!!int, !!str, !tag)?

Built-in YAML tags (!!int, !!float, !!bool, !!null, !!str, !!seq, !!map) are honored and produce correctly-typed JSON. Custom tags (e.g. application-specific !MyType) are dropped with a warning - they have no JSON equivalent.

Powered by Data Converter - JSON / XML / CSV / YAML.

Other targeted versions of this tool — each tuned for a specific use case.

Or use the main Data Converter - JSON / XML / CSV / YAML if your use case isn't covered above.