YAML ↔ JSON
Convert between YAML and JSON formats. Real-time conversion.
About this tool
Convert between YAML and JSON in either direction, with live conversion as you type. YAML is easier to read and edit by hand (config files, CI pipelines, Kubernetes manifests); JSON is what most APIs and programmatic tooling expect. This tool bridges the two without needing a library on your machine.
YAML → JSON example: a YAML mapping name: Alice with a sequence roles: [admin, user] becomes a JSON object with an array value.
JSON → YAML example: a JSON object with version and stable keys becomes clean YAML with two top-level keys.
Supports nested maps, sequences, inline flow syntax, quoted strings, booleans, nulls, numbers, and comments. Multi-document YAML files (separated by ---) are not supported in this release.
FAQ
Does this support YAML anchors and aliases? ›
No. Anchors and aliases are parsed as literal text. If your YAML uses them, resolve them first in another tool or expand them inline before pasting.
Can I convert a multi-document YAML file? ›
Not in this release — only a single document is supported. Split the file at each --- separator and convert each document separately.
Why does my YAML output look different from the input? ›
The serializer normalizes quoting, indentation (2 spaces), and scalar representation (e.g. yes/no become true/false) so the output is unambiguous and round-trips cleanly back to JSON.
Are tabs allowed for indentation? ›
No — YAML forbids tabs for indentation. The parser will report an error if it encounters a tab in indentation; use spaces instead.
Is my YAML valid before I convert it? ›
The converter reports parse errors for invalid YAML. For a detailed syntax check with line-level diagnostics — including tab detection, duplicate keys, and the Norway problem — use the YAML Validator before conversion.
Can I also convert between TOML and JSON? ›
Yes — use the TOML ↔ JSON converter for bidirectional TOML↔JSON conversion. Each format pair has its own dedicated tool because TOML and YAML have different syntax rules, quoting conventions, and data-type representations.