This tool converts YAML into JSON, turning the clean, indentation-based configuration format into the structured format that programs and APIs consume. YAML and JSON describe the same kinds of data, objects, lists and values, but they look very different. YAML is designed for humans, using indentation and minimal punctuation, which makes it the format of choice for configuration files in tools like Docker, Kubernetes and CI pipelines. JSON is designed for machines, with explicit braces, brackets and quotes, and is what most code and web APIs expect. Moving from YAML to JSON is a routine task whenever a human-edited config needs to be fed to a program, and doing it by hand is error-prone. This converter does it instantly. You paste your YAML, and the calculator parses the indentation, the key-value pairs and the dashed lists, then produces the equivalent JSON, neatly formatted. The result updates as you type and runs entirely in your browser, so your data is never uploaded. Use it to turn a config file into JSON, to feed YAML data to a program or API, to learn how the two formats correspond, or for development work. The converter understands the common YAML constructs: nested objects shown by indentation, lists written with dashes, and scalar values, automatically recognising numbers, booleans and null so they become the right JSON types rather than strings. This complements the JSON to YAML converter for the reverse direction. A note on scope: YAML is a rich format with advanced features like anchors, multi-line block scalars and flow style, which this converter does not fully support; it handles the everyday indentation-based maps, lists and scalars that make up the vast majority of real configuration files. For those, it gives you clean, correct JSON in a moment, ready to drop into your code.
Handles indentation-based maps, dashed lists and scalars (numbers, booleans, null recognised). Advanced YAML (anchors, block scalars) is not supported. Runs in your browser.
The converter reads the YAML line by line, using the indentation to track nesting. Lines with a key and value become object properties, lines starting with a dash become list items, and deeper indentation creates nested objects or lists. Scalar values are typed: numbers, true, false and null are recognised, and everything else is treated as a string.
Pasting YAML with a name, a tools list of two dashed items, an active flag and a count converts to a JSON object: name as a string, tools as an array of two strings, active as the boolean true, and count as the number 779, all with proper braces, brackets and quotes ready for code.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
© 2019 to 2026 Calculate.co.nz. All rights reserved.