YAML to JSON
Convert YAML config into formatted JSON instantly.
- 100% Free
- No Sign Up
- Works in Your Browser
YAML to JSON
Convert YAML into JSON
More Developer Tools
View all tools- JSON to CSVTurn a JSON array into CSV
- CSV to JSONTurn CSV rows into JSON
- JSON to YAMLConvert JSON into YAML
- JSON to XMLConvert JSON into XML
- XML to JSONConvert XML into JSON
- JSON formatterPretty-print and indent JSON
- Base64 encode/decodeEncode and decode Base64 text
- JWT decoderDecode a JSON Web Token
- UUID generatorGenerate random v4 or time-ordered v7 UUIDs
Every everyday developer tool, right in your browser.
No installs. No uploads. No signup.
Browse all 36 tools- Developer tools
- 36
- Cheat sheets
- 10
- Bytes uploaded
- 0
How to use the YAML to JSON
Three steps, all in your browser.
- 1
Paste your input
Type or paste your code or data. Press Sample to try an example.
- 2
Check the options
Adjust the options if you need to. The conversion updates instantly.
- 3
Copy the result
Copy the output in one click. Nothing is saved or sent anywhere.
YAML to JSON: what to know
YAML to JSON parses YAML with js-yaml and outputs formatted JSON. It's useful when a tool or API wants JSON but your configuration is written in YAML, and as a way to see exactly how a YAML parser reads your file, which is often the fastest way to debug a confusing YAML problem.
If the YAML is invalid, the error includes the line and column. Indentation causes most problems: YAML forbids tab characters for indentation, items at the same level must be indented by the same amount, and a list item's dash needs a space after it. A value that contains ': ' or starts with characters such as *, & or ! may need quotes.
Comments are dropped, since JSON has none. Anchors and aliases (&default and *default, often used to share settings) are resolved, so each alias becomes a full copy of the value it points to. Multi-document YAML files separated by --- need to be converted one document at a time.
Popular uses
- Debugging how a YAML config file is actually parsed
- Feeding YAML config into a JSON-only tool or API
- Converting OpenAPI specs from YAML to JSON
- Checking anchors and merge keys resolve as expected
Tips for the best result
- If a value comes out as true or false unexpectedly, quote it in the YAML.
- Times like 12:30 and numbers with leading zeros can be read as numbers in some YAML versions; quote them to keep them as text.
- Paste one document at a time if the file contains several separated by ---.
Read how JustYourDev works and our privacy details. Code, data and files you use here are processed in your browser and are never sent to our server.