YAML ⇄ JSON converter
Convert YAML to JSON and back — Kubernetes manifests, CI configs, OpenAPI specs.
Related tools
YAML ⇄ JSON converter
Paste a YAML file and get JSON back, or paste JSON and get clean YAML — the direction switch converts both ways. This is the quickest way to turn a Kubernetes manifest or a docker-compose file into JSON for a script, jq or an API call, to check what a GitHub Actions workflow actually contains, or to move an OpenAPI spec between the two formats. Configuration formats rarely match the tool you have at hand; this converter closes that gap without installing anything.
The YAML side parses safely: anchors and aliases are resolved into plain values, and a multi-document stream separated by --- becomes a JSON array with one element per document. Parse errors are reported calmly with the line number, so a bad indent on line 40 of a long pipeline config doesn't turn into guesswork. Going the other way, valid JSON is always valid YAML — the tool emits readable block-style YAML and keeps long strings on one line instead of folding them.
The indent option controls the output: two spaces (the YAML convention), four spaces, or minified. Minified applies to JSON only — YAML has no minified form, so that choice honestly falls back to two spaces there. Comments do not survive the conversion in either direction; JSON has nowhere to put them.
Everything runs locally in your browser and nothing is uploaded — which matters, because real-world config files carry tokens, internal hostnames and connection strings. Convert, copy the result or download it as a file, and chain it into the JSON formatter or flattener for the next step.