JSON to YAML Converter NZ
This tool converts JSON into YAML, turning the data format that programs exchange into the cleaner, more human-friendly format often used for configuration files. JSON and YAML represent the same kinds of structured data, objects, lists and values, but they look very different. JSON uses braces, brackets, quotes and commas, which is precise and great for machines but noisy to read and edit. YAML uses indentation and minimal punctuation, which is far easier for people to write and review, and so it has become the standard for configuration in tools like Docker, Kubernetes, CI pipelines and many application settings. Converting between them is a routine task, and doing it by hand is fiddly and error-prone. This converter does it instantly. You paste your JSON, and the calculator validates it, then produces the equivalent YAML, properly indented, with objects as key-value pairs, arrays as dashed lists, and values written cleanly. The result updates as you type and runs entirely in your browser, so your data is never uploaded. Use it to turn an API response or data file into a config file, to make JSON easier to read, to learn how the two formats correspond, or for development work. If the JSON is not valid, the converter tells you so you can fix it before converting. The output follows standard YAML conventions: nested objects are shown by increasing indentation, lists by dashes, and strings are quoted only when needed, such as when they contain special characters. Because YAML is a superset of JSON in many respects, the conversion preserves the structure exactly, just presenting it in the lighter, indentation-based style. The result is ready to paste into a configuration file or YAML-aware tool.
Validates the JSON, then converts to indented YAML: objects as key-value pairs, arrays as dashed lists. Runs entirely in your browser; nothing is uploaded.
How it works
The tool parses your text as JSON to confirm it is valid, then walks the structure recursively to build YAML. Objects become key-value lines, with nested objects indented further. Arrays become lines starting with a dash. Values are written plainly, with quotes added only when a string could be misread, such as one containing a colon or special characters.
Worked example
Pasting a JSON object with a name, a list of tools, an active flag and a count converts to YAML with name on its own line, tools as a dashed list of two items each indented below it, active set to true, and count set to 779, all using indentation instead of braces and commas, ready for a configuration file.
Related calculators
- JSON Formatter: format JSON.
- CSV to JSON: CSV conversion.
- URL Encode/Decode: encode for URLs.
- Base64 Encoder: encode data.