YAML ⇄ JSON
Convert YAML to JSON or JSON back to YAML, full spec support via a real parser. Paste a config; it’s converted in your browser and never uploaded.
YAML and JSON, both ways
YAML is what humans write, config files, CI pipelines, Kubernetes manifests; JSON is what machines and APIs prefer. This converter goes both directions using a full YAML parser, so anchors, multi-line strings, typed scalars (numbers, booleans, null, dates), and nested structures all convert correctly, not just the simple key/value cases.
Notes that trip people up
- JSON is valid YAML. YAML is a superset, which is why a
.jsonfile usually parses as YAML too. - Types matter. Unquoted
true/falseand bare numbers become booleans/numbers. This parser follows YAML 1.2, soyes,no,on,offstay strings (unlike YAML 1.1). Quote anything you want kept as text. - Indentation is structure in YAML, tabs are not allowed for indentation; use spaces.
FAQ
Does it support all YAML features?
It uses a complete YAML 1.2 parser (js-yaml), so anchors/aliases, block and flow styles, multi-line scalars, and typed values are all handled.
Is my config uploaded?
No, conversion runs entirely in your browser, so secrets in a config stay local and the tool works offline.
Is my on: value a boolean or a string?
This parser follows YAML 1.2, where only true/false are booleans, bare on/off/yes/no stay strings. YAML 1.1 (and tools like GitHub Actions) treat them as booleans, which is a classic source of confusion. Write true/false when you need an actual boolean.
Related
From a spreadsheet instead? CSV ⇄ JSON. Type the result with JSON → TypeScript or JSON → Go.