YAML to JSON Converter
Convert YAML to JSON right in your browser, with no data sent to any server. Paste the YAML and copy ready-to-use JSON for APIs, configs and scripts.
JSON
—
Quick YAML snippets straight to JSON
You copied a chunk of YAML config — from a docker-compose file, from a GitHub Actions workflow — and need it as JSON to test in an API, a script, or a field that only accepts JSON. Writing a script for that is overkill. Paste the YAML in the box and the JSON appears below as you type, already indented. It is a deliberately simple converter, built for the common case: indented maps, lists and plain values.
Under the hood it reads indentation to build nested objects, treats lines starting with a hyphen as list items and ignores # comments. Values that look numeric become real JSON numbers — with a classic side effect: a version like 1.10 turns into the number 1.1. Quote it in the YAML to keep it as text; the converter strips the quotes and preserves the string. Also note that true and false are not converted to booleans: they come out as text.
Use it for everyday snippets: keys and values, lists, a few levels of nesting. Advanced YAML features are out of scope — anchors and references (& and *), multiline block scalars with | or >, inline collections like [a, b], and multi-document files separated by ---. If your file uses those, run a full parser such as js-yaml. The whole conversion happens in your browser, with nothing sent to a server, so configs holding secrets never leave your machine.
Frequently asked questions
Why did 1.10 become 1.1 in the JSON?
Does true become a boolean?
Does it support anchors or multiline blocks?
Related Tools
YAML to JSON
Convert YAML data to JSON format.
YAML to TOML Converter
Convert config files from YAML to TOML right in your browser, preserving strings, numbers and booleans. Handy for migrating configs between formats.
JSON to YAML
Convert JSON data to YAML format.
YAML to NDJSON Converter
Explains how to represent YAML lists as NDJSON (one JSON object per line) with practical examples.
TOML to YAML Converter
Convert config files from TOML to YAML right in your browser, preserving strings, numbers and booleans. Handy for migrating configs between formats.
MessagePack to JSON (text) Converter
Explains the MessagePack binary format, its advantages and how to translate it into textual JSON.