YAML to JSON Converter

Paste your YAML and get JSON instantly — or flip the toggle to convert JSON back to YAML. Everything runs in your browser, nothing is uploaded. Free, no signup.

YAML input
JSON output

What does this tool do?

This is a free online YAML to JSON converter. Paste a YAML document on the left and the equivalent JSON appears on the right as you type. Flip the direction toggle and it works the other way too — JSON to YAML. Because both YAML and JSON describe the same underlying data model (maps, lists, strings, numbers, booleans and null), converting between them is lossless for the data itself.

The conversion runs entirely in your browser. Nothing you paste is sent to a server, so it is safe to use with config files, secrets templates, or anything you would not want to upload. It also means it keeps working offline once the page has loaded.

How to convert YAML to JSON

YAML to JSON conversion rules (and gotchas)

A few things are worth knowing so the output never surprises you:

JSON to YAML

Going the other way, this tool produces clean, block-style YAML: two-space indentation, no unnecessary quoting, and arrays as dash lists. That makes it handy for turning an API response or a package.json snippet into a Kubernetes manifest, a GitHub Actions workflow, or a docker-compose file — formats that are far more pleasant to read and edit as YAML.

YAML vs JSON — which should you use?

JSON is the lingua franca of web APIs: strict, unambiguous, and supported everywhere. It is great for machines but noisy for humans because of all the braces and quotes. YAML is a superset of JSON designed for humans — it drops the punctuation, allows comments, and reads top-to-bottom like an outline. That is why configuration files (Kubernetes, Ansible, CI pipelines, docker-compose) overwhelmingly use YAML, while data sent over the wire uses JSON. Converting between them lets each side of your workflow use the format that fits.

Common uses

FAQ

Is this YAML to JSON converter free?

Yes. It is completely free, needs no account, and runs entirely in your browser. Your data is never uploaded to a server.

Is my data safe?

Yes. All conversion happens locally in your browser with JavaScript. Nothing you paste leaves your device, so it is safe for sensitive config files.

Does converting YAML to JSON keep my comments?

No. JSON has no concept of comments, so YAML comment lines (starting with #) are dropped. The data itself is preserved exactly.

Why do I get a parse error?

The most common causes are using a tab for indentation (YAML requires spaces), inconsistent indentation, or a missing colon/quote. The red error message points to the line.

Can I convert JSON back to YAML?

Yes — switch the toggle to JSON → YAML, paste valid JSON, and you get clean YAML out.

Is there a size limit?

There is no fixed limit; you are only bounded by your browser's memory since everything runs locally. Very large files (tens of MB) may feel slow.

More format converters