YAML to JSON Converter
Convert YAML to JSON and back, in your browser.
Pick a direction. Block sequences, mappings, scalars and inline flow are supported. Anchors, multi-document and tags are out of scope - see the FAQ.
How to use it
Pick a direction
YAML to JSON or JSON to YAML.
Paste your source
Sample is pre-filled. Indent with spaces, not tabs.
Copy the output
Output appears in the right pane; copy button next to the heading.
What is it?
YAML and JSON describe the same value space (objects, arrays, scalars) in different syntaxes. JSON is more strict and widely embedded; YAML is friendlier for human-edited config. A converter lets you move config between systems without retyping or making indentation mistakes.
When to use it
Translating a Kubernetes manifest into JSON for an API call. Reading a CI config in JSON form. Generating a starter config from JSON sample data. Comparing two configs that arrived in different formats.
Common mistakes
Forgetting that YAML treats `yes`, `no`, `on`, `off` as booleans (the 'Norway problem'). Mixing tabs and spaces - YAML rejects tabs for indentation. And expecting comments to survive a round-trip: JSON has none, so YAML -> JSON drops comments forever.
FAQ
- Are YAML anchors / aliases supported?
- No. Multi-document (---), tags (!!str, !!int) and folded/literal scalars (>, |) are also unsupported. For those, run yq or a full parser.
Related tools
More in this category
- JSON Formatter & Validator
- Base64 Encoder / Decoder
- URL Encoder / Decoder
- Hash Generator (SHA-1, SHA-256, SHA-384, SHA-512)
- JWT Decoder
- Regex Tester
- Markdown to HTML Converter
- CSV to JSON Converter
- SQL Formatter
- HTML Entity Encoder / Decoder
- Cron Expression Reader
- XML Formatter
- HTML Minifier
- Mock Data Generator
- Markdown Table Generator