YAML ↔ JSON Converter
Convert YAML to JSON or JSON to YAML instantly. Paste or drop a file — the direction auto-detects. Pretty-printed output, parse errors shown inline. Runs entirely in your browser.
Drop a .yaml, .yml, or .json file
or click to browse
How the YAML ↔ JSON Converter Works
This tool uses js-yaml (MIT, ~50KB) running entirely client-side via WebAssembly compilation. For YAML → JSON, the input is parsed with yaml.load() and serialized with JSON.stringify(parsed, null, 2) for 2-space indentation. For JSON → YAML, the input is parsed with JSON.parse() then serialized with yaml.dump().
Parse errors from either library are shown inline with the exact message, which often includes a line and column number. Common examples: Kubernetes manifests, GitHub Actions workflows, docker-compose files, and package.json configs.