YAML to JSON
Convert YAML into JSON with correct types for numbers, booleans, and null values, so you can paste the result straight into an API request body.
How to use
- Paste YAML into the input.
- Set the indent width for the JSON output.
- Copy the JSON result.
YAML to JSON conversion parses a practical YAML subset and writes the result as JSON. Scalars are typed on the way through, so yes, no, true, false, null, and tilde all become JSON values.
Paste or type something above.
Questions about yaml to json
- Which YAML features are not supported?
- Anchors, aliases, tags, and multi-document files are rejected with a clear message rather than guessed at.
- Are booleans converted correctly?
- Yes. true, false, yes, no, on, and off become JSON true and false, and null or an empty value becomes null.
- Why did a line fail to parse?
- Every YAML line has to be a mapping entry or a list item. The error names the line number and what was expected there.
Related tools
- JSON to YAML Convert JSON data into YAML with correct quoting, nesting, and indentation, for config fil...
- JSON Formatter Format minified or badly indented JSON into clean, readable output with your choice of ind...
- JSON Validator Check whether JSON is valid and see the exact line and column where the syntax breaks, plu...