JSON to YAML Converter
Convert JSON to YAML instantly, live as you type.
Converts live as you type, entirely in your browser. Invalid JSON shows the parser's exact error message.
Need the opposite? JSON to XML Converter
What is JSON to YAML Converter?
Paste JSON and get the equivalent YAML instantly, useful for converting a config file, API response, or data structure into the more human-readable YAML format used by many CI/CD and infrastructure tools.
How to Use the JSON to YAML Converter
- 1
Paste the JSON: Enter a JSON object, array, or config value.
- 2
Read the YAML Result Instantly: The equivalent YAML appears automatically as you type.
- 3
Copy the Result: Use the copy button to copy the YAML for a CI/CD pipeline or config file.
How the Mapping Works
JSON object keys become YAML keys at the same nesting level, indented two spaces deeper than their parent. Arrays become a list of "- " prefixed items, one per line. Strings, numbers, booleans, and null map directly to YAML's equivalent scalar types, without quotes unless the string needs them (e.g. it contains a colon or starts with a special character).
Example
Input:
{ "name": "Alice", "active": true, "roles": ["admin", "editor"] }
Output:
name: Alice
active: true
roles:
- admin
- editor
Each top-level key lines up at the same indentation, and the "roles" array becomes an indented list of "- " items underneath its key.Frequently Asked Questions
Common questions about JSON to YAML Converter.