YAML ↔ JSON Converter

YAML Input
JSON Output

How to Convert YAML to JSON

YAML is a superset of JSON, so most valid YAML converts cleanly to JSON. Paste your YAML into the left panel and click Convert (or just start typing — conversion happens automatically). The right panel shows formatted, indented JSON. Arrays, nested objects, and quoted strings are all handled correctly.

How to Convert JSON to YAML

Switch to "JSON → YAML" mode using the toggle above. Paste your JSON in the left panel and the converter outputs clean YAML. JSON always produces valid YAML since JSON is a valid YAML subset. Use "Use as Input" to chain multiple conversions.

YAML vs JSON: Key Differences

FeatureYAMLJSON
ReadabilityHigh — uses indentation and minimal punctuationModerate — requires braces, brackets, and quotes
CommentsSupported (# prefix)Not supported
Data typesRich — includes dates, binary, anchorsBasic — string, number, boolean, null, array, object
File sizeGenerally smaller due to less punctuationSlightly larger but more explicit
Common use casesConfig files (Docker, Kubernetes, CI/CD)APIs, data interchange, storage