How to use
- Paste YAML or JSON. Auto mode detects the format and converts to the other one.
- Use Format YAML to re-indent a YAML file without converting it.
- Click Swap to continue working with the output, then copy or download.
Convert between YAML and JSON, validate and format
YAML is a superset of JSON designed to be readable by humans, which is why Kubernetes, Docker Compose, GitHub Actions and most CI systems use it. Converting to JSON is useful for programmatic processing, diffing and validation; converting to YAML is useful for configuration files. This tool uses a full YAML 1.2 parser, reports syntax errors with line numbers and never sends your configuration to a server.
If the input parses as JSON and starts with { or [, it is converted to YAML. Anything else is treated as YAML and converted to JSON. You can force a direction with the mode buttons.