AnyFormat

00 JSON → YAML

JSON to YAML

Ambiguous strings quoted automatically. Safe for Kubernetes manifests.

01JSON in
02YAML out
03Options 3
  • No upload The conversion runs in this tab. Your file never travels — not to us, and not to the advertising.
  • No sign-up, no email, no daily cap There is no account system to sign up to.
  • No size limit we invented Only your device's memory — about ~2 GB on a desktop browser, ~400 MB on a phone.
  • Turn your Wi-Fi off and convert anyway The conversion needs nothing but this page. Ads will not load without a connection; your file will still convert. That is the whole claim, and it takes five seconds to check.

Paste JSON and get YAML. The usual reason is that you have an API payload and need it as a config file — a Kubernetes manifest, a GitHub Actions workflow, a Docker Compose service. Nothing leaves this tab, which matters when the payload has credentials in it.

The values YAML would silently change

YAML's type rules are looser than JSON's, and a few strings mean something else if written bare. The string "no" is a boolean in the YAML 1.1 schema that most parsers still use — so is y, yes, off and on. A version number like 1.10 becomes the float 1.1, losing the trailing zero. A country code such as NO for Norway becomes false.

Every one of those is quoted automatically here. It is the most common way a hand-written JSON-to-YAML conversion breaks a deployment, and it fails at runtime rather than at parse time.

Formatting choices that matter

Long strings are kept on one line rather than folded. Folding is legal YAML but changes where line breaks fall when the value is read back, which corrupts embedded scripts, certificates and base64 blobs.

Anchors and aliases are never emitted. A JSON document that references the same object twice would otherwise produce &ref_0 / *ref_0, which is correct YAML that a surprising number of tools cannot read.

Two-space indentation, and why lists look like that

The output uses two-space indentation, which is the convention in every ecosystem that uses YAML heavily. List items are indented under their key rather than sitting at the same level. Both styles are valid and identical to a parser; the indented form is what kubectl, Helm and GitHub Actions all produce.

Other names for this

Also searched as “json to yml”, “convert json to yaml online”.

Questions

Why are some of my strings in quotes?
Because YAML would read them as something else. no, y, off and version numbers like 1.10 all change meaning if left bare.
Can I convert a JSON array at the top level?
Yes — YAML allows a sequence as the root document, unlike TOML.
Will comments be preserved?
JSON has no comments to preserve. Going the other way, YAML to JSON, comments are lost because JSON cannot express them.
Is my data uploaded anywhere?
No. The conversion runs as JavaScript inside this tab. Open your browser's Network panel and convert something — you will see no request carrying your data, because there is no server to send it to. You can also turn your Wi-Fi off and convert anyway.