About this tool
YAML is common in configuration files and CI pipelines, but many APIs and tools only accept JSON. This converter parses YAML and outputs equivalent JSON, expanding anchors and aliases.
YAML to JSON example
The converter parses the YAML structure and outputs the equivalent JSON. Anchors and aliases are expanded into plain values.
name: app
ports:
- 80
- 443
{ "name": "app", "ports": [80, 443] }Common YAML mistakes
YAML must be indented with spaces, never tabs, and each level must be indented consistently. A colon followed by a space inside an unquoted value starts a new key, so wrap such values in quotes. If the converter reports an error, check the line it names first.
Comments are dropped because JSON has no comment syntax, and only a single YAML document is converted at a time.
How to use it
- Paste YAML.
- Pick an indentation style.
- Copy the JSON or download it.
Frequently asked questions
Does it support anchors and aliases?
Yes. They are resolved into plain values in the JSON output.
What about YAML comments?
Comments are dropped because JSON has no comment syntax.
Does it handle multiple documents?
Only a single YAML document is converted.