YAML ⇄ JSON Converter
Kubernetes manifests, CI configs or any YAML in — clean JSON out. Or turn JSON back into readable YAML.
YAML and JSON are not interchangeable in practice
YAML is what humans write — comments, anchors, block scalars, no mandatory quotes. JSON is what machines exchange — strict, explicit, every string quoted. Every Kubernetes manifest, GitHub Actions workflow, Docker Compose file and Ansible playbook is YAML; almost every API, database and test fixture speaks JSON. Moving between the two is a daily task.
This converter resolves the YAML features that plain value-by-value converters get wrong:
anchors and aliases (&defaults / *defaults) are expanded into
the final value, merge keys (<<) are applied, block scalars
(| and >) keep their newline semantics, and
multi-document streams separated by --- come out as a JSON array.
FAQ
Are comments preserved?
No. JSON has no comment syntax, so YAML comments are dropped in the YAML → JSON direction. Round-tripping YAML → JSON → YAML also loses them.
Why did my YAML fail to parse?
Almost always indentation. YAML forbids tabs, requires consistent child indentation, and is sensitive to a missing space after key:. The error line and column point at the exact token that broke it.
What about dates and large numbers?
Unquoted ISO dates are recognised by YAML and emitted as ISO strings in JSON. Use tag:yaml.org,2002:str semantics by quoting a value if you want it treated as a plain string.
Is my config uploaded anywhere?
No. Parsing and generation run entirely in your browser, which matters when the YAML contains secrets, tokens or cluster topology.