Loading tool…
About the YAML to JSON Converter
YAML is easier for humans to write, JSON is easier for most programs and APIs to consume. Paste any YAML document to get its JSON equivalent, pretty-printed and ready to use.
How to use the YAML to JSON Converter
- Paste your YAML.
- The equivalent JSON appears automatically as you type.
- YAML syntax errors are reported with a line number.
- Copy or download the JSON output.
Step-by-step walkthrough with examples and the errors people hit: How to Convert YAML to JSON.
Example
YAML input
name: Ada roles: - admin - user→
{
"name": "Ada",
"roles": ["admin", "user"]
}
Common errors and how to fix them
bad indentation of a mapping entry
A line is indented by a different number of spaces than its siblings, or a tab crept in. YAML requires spaces and consistent indentation within a block.
A port or version came out as a number
YAML types 8080 as a number and 1.10 as 1.1. Quote them ("8080", "1.10") if the consuming system expects strings.
More problems and fixes in the tutorial
FAQ
Does this support multi-document YAML?
Yes — a --- separated file (common in Kubernetes manifests) converts to a JSON array, one entry per document. A single document converts to a plain JSON object, not a one-element array.
Are YAML comments preserved?
No — JSON has no comment syntax, so comments are dropped in the conversion, same as any YAML-to-JSON conversion.
Is my YAML uploaded anywhere?
No, conversion happens entirely in your browser using a client-side YAML parser.