About this tool
YAML and JSON represent the same kinds of data — nested maps, lists, strings, numbers, booleans — but with very different syntax, and configuration files, Kubernetes manifests, and CI pipelines commonly use YAML while application code and APIs expect JSON. This tool converts between the two directly, preserving nested structure, lists, and correctly typing scalar values like numbers and booleans rather than leaving everything as strings. It's useful for turning a YAML config file into JSON for use in a script, or converting a JSON API response into YAML for a Kubernetes or Docker Compose file. The conversion direction is handled automatically based on your input, and everything runs locally in your browser.
Frequently asked questions
Does it preserve nested structure correctly?
Yes, nested maps and lists in YAML convert to the equivalent nested objects and arrays in JSON, and vice versa, without flattening the structure.
Are YAML anchors and aliases supported?
Common YAML anchor (&) and alias (*) references are resolved during conversion so the resulting JSON contains the fully expanded data.
Does it correctly type booleans and numbers?
Yes, YAML values like true, false, and numeric strings are converted to their proper JSON types rather than staying as plain text strings.
Which direction does it convert automatically?
The tool detects whether your input is YAML or JSON based on its syntax and converts to the other format accordingly.
Can I convert a Kubernetes manifest with this tool?
Yes — Kubernetes YAML manifests use standard YAML syntax and convert to JSON cleanly, useful for feeding into tools or scripts that expect JSON.