1001Ferramentas
🔁Converters

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?
Anything that looks numeric is converted to a number. Quote the value in the YAML to keep it as a string.
Does true become a boolean?
No, it comes out as the string 'true'. Cast it on the receiving side if you need the boolean type.
Does it support anchors or multiline blocks?
No. For YAML using &, *, | or >, reach for a full parser like js-yaml.

Related Tools