YAML ↔ JSON Converter
Paste a manifest or a JSON payload — convert both ways with multi-document support and merge-key expansion.
Convert YAML ↔ JSON in your browser. Anchors, aliases, merge keys, and multi-doc streams — nothing is uploaded.
Multi-document YAML (---) becomes a JSON array. Anchors/aliases are resolved; << merge keys are expanded. Comments are dropped (JSON has none).
Drop a YAML or JSON file
Up to 2.0 MB — stays in your browser
2 documents → JSON array
Sponsored
Ad space
How to use this tool
- Pick YAML → JSON or JSON → YAML.
- Paste text or drop a .yaml / .yml / .json file. Choose Pretty or Minify for JSON, or indent width for YAML.
- Copy or download the result.
Config files ↔ API JSON — without uploading secrets
Kubernetes manifests, Compose files, and CI configs are YAML; APIs and frontends speak JSON. This converter focuses on that loop: resolve anchors, expand << merges, and turn multi-document streams into JSON arrays you can paste into a mock or editor.
Need to pretty-print or validate JSON on its own? Use the JSON Formatter. Turning spreadsheet rows into objects instead? Try CSV ↔ JSON. Need sample API JSON? Open the JSON / Mock Data Generator.
FAQ
Is my YAML or JSON uploaded?
No. Parsing and conversion run entirely in your browser. Config files and secrets never leave your device.
Do anchors, aliases, and merge keys work?
Yes. Anchors (&name) and aliases (*name) are resolved. The << merge key is expanded so you see the same merged object Kubernetes-style tools expect — not a literal "<<" key.
What about multi-document YAML?
Documents separated by --- become a JSON array (one element per document). JSON → YAML always emits a single document — arrays become YAML sequences — because JSON has no document-separator concept.
Why did "yes" stay a string?
This tool uses YAML 1.2 Core typing: true/false and null are booleans/null; yes/no/on/off stay strings. That avoids the classic YAML 1.1 surprise where country: no became false.
Are comments preserved?
No. JSON has no comments, so YAML comments are dropped on YAML → JSON. Round-tripping cannot restore them.
What is the file size limit?
About 2 MB of text in the browser. That covers typical manifests and configs. Very large dumps belong in a local script or CLI.
Sponsored
Ad space