YAML to JSON Converter

Convert YAML configs into JSON without pasting your infrastructure files into a random web service — this page does the entire conversion inside your browser, free and with nothing uploaded. Ideal for Kubernetes manifests, CI configs, and Docker Compose files.

YAML

YAML is a human-friendly data format widely used for configuration files in DevOps tools such as Docker, Kubernetes, and CI pipelines. It expresses nested structures through indentation instead of brackets.

JSON

JSON is the standard data-interchange format of the web. It stores structured, possibly nested records in human-readable text and is the native format of most modern APIs and configuration files.

How the YAML to JSON conversion works

The YAML is parsed locally with a spec-compliant parser: mappings become objects, sequences become arrays, and anchors and aliases are resolved to their actual values. Comments are dropped, because JSON has no way to represent them.

The parsed data is then normalized through a tabular representation: nested mappings are flattened to dot-notation keys by default, which is ideal when the JSON feeds a table or spreadsheet next. Prefer the original structure? Tick "Rebuild nested objects" and the output restores full nesting.

Frequently asked questions

What happens to my YAML comments?
They are removed. JSON has no comment syntax, so there is nowhere to put them — keep a copy of the YAML if the comments matter.
Are anchors and aliases supported?
Yes. Aliases are expanded during parsing, so the JSON contains the resolved values exactly as a YAML-aware tool would see them.
Why does my output have keys like spec.replicas?
Nested mappings are flattened to dot-notation by default so the data can be previewed as a table. Enable "Rebuild nested objects" in the options to emit conventional nested JSON instead.
Can I convert a multi-document YAML file?
Not in one pass — files with --- separators contain several documents, and the converter reports this clearly. Split the file and convert one document at a time.