Convert JSON to YAML

Turn JSON into readable YAML.

YAML

About this converter

Almost always because a tool wants YAML: Kubernetes manifests, GitHub Actions workflows, Docker Compose files and OpenAPI documents are all written in it, and a JSON version of any of them is something to be converted before use.

YAML is a superset of JSON, so this direction is the easy one — everything JSON can hold, YAML can hold. What you gain is readability: no braces, no quotes around keys, and comments become possible once it is YAML, which is usually why the file wants to be YAML in the first place.

Strings that would be ambiguous get quoted automatically. A value of "yes", "no", "on" or "off", or something that looks like a number or a date, is quoted so it stays a string — which is the single most common way a YAML file ends up meaning something its author did not intend.

Frequently asked questions

Why are some of my strings quoted and others not?

Quotes appear where leaving them off would change the meaning. In YAML a bare yes, no, on or off can be read as a boolean, and 1.10 as a number, so a string with one of those values is quoted to keep it a string. Everything unambiguous is left bare, which is what makes YAML readable.

Can I get comments out of this?

No — there were none to carry. JSON has no comments, so nothing in your input could become one. Going the other way, YAML to JSON, comments are lost for the same reason.

Is YAML really a superset of JSON?

Since YAML 1.2, yes — any valid JSON document is valid YAML, which is why this direction never fails on structure. The reverse is not true: YAML has anchors, multiple documents per file and non-string keys, none of which JSON can hold.

Does what I paste get sent anywhere?

No. The conversion runs in your browser, on your own machine — which is why the result appears as you type. Nothing is uploaded and nothing is logged. That matters for this kind of tool in particular: config files and API responses are exactly the things that carry keys, hostnames and customer data.

Related tools