YAML to JSON
YAML to JSON converts YAML, the indented format used for container setups, build pipelines and app settings, into JSON.
What YAML to JSON does
YAML to JSON converts YAML, the indented format used for container setups, build pipelines and app settings, into JSON. Use it when a tool or API only accepts JSON, or when you want to see how YAML nesting really resolves.
The JSON updates as you type. Invalid YAML gives the reason and the line number. The conversion follows a strict, JSON-compatible schema, so words like yes and no stay as text rather than becoming true or false, and dates stay as text. Anchors and aliases are expanded, with a guard that stops files built to expand without end.
How to use YAML to JSON
- Paste the YAML
Paste or type it into the box.
- Fix any errors
If there is a mistake, the message shows the line to check.
- Take the JSON
Copy it or download data.json.
Questions about YAML to JSON
Why did yes or on stay as text?
This converter treats only true and false as booleans, which avoids surprises such as the country code NO turning into false.
Does it handle multiple documents separated by ---?
No. Paste one document at a time; more than one gives an error.
Are comments kept?
No. JSON has no comments, so they are dropped.
What does empty YAML become?
An empty box gives null, which is how JSON represents an empty YAML document.