How to use it
- Pick JSON → YAML or YAML → JSON and paste. The result updates as you type.
- Choose 2 or 4 spaces of indent. Swap sends the result back to convert the other way.
- Copy or Download the result (
converted.yaml/converted.json).
Example
This YAML uses an anchor (&defaults) and a merge key (<<):
defaults: &defaults
region: eu-west
replicas: 2
web:
<<: *defaults
replicas: 3
becomes this JSON (the merge is expanded, replicas overridden):
{
"defaults": { "region": "eu-west", "replicas": 2 },
"web": { "region": "eu-west", "replicas": 3 }
}
Safe YAML output
YAML 1.1 readers (PyYAML and many CI tools) read yes, on, n or 2026-11-18 as a boolean or a date. When
converting to YAML, text values like these are quoted ('yes'), so every YAML reader gets back exactly the JSON you
started with.
Good to know
- YAML is read with the YAML 1.2 core schema:
yes,noand dates stay text,true/false/nulland numbers are values. Anchors, aliases and merge keys are expanded. - JSON has no comments, so comments in YAML are left out (we tell you when that happens).
- One YAML document at a time: a file with
---between documents is explained instead of silently cut.
FAQ
Why are some values quoted in the YAML?
Quotes keep text as text for every YAML reader. Without them, answer: yes would become true in YAML 1.1 tools.
Is my data uploaded?
No. Conversion happens in your browser with js-yaml, served from this site. See the privacy page.