Free developer tool

JSON to YAML converter

Paste JSON, get clean YAML, or go the other way. Everything runs in your browser, so config files and secrets never leave your machine.

Runs entirely in your browser. Nothing you paste is sent to a server.

How to use it

  1. Paste JSON into the left box and click JSON → YAML.
  2. To go the other way, paste YAML and click YAML → JSON. The output is pretty-printed with two-space indentation.
  3. Click Copy output and drop it into your manifest, compose file or pipeline.

If the input is invalid, the message under the buttons shows the parser error so you can find the broken bracket or indentation quickly.

When you need JSON to YAML

Most infrastructure tools read YAML, while most APIs and SDKs emit JSON. The common cases:

  • Kubernetes manifests. kubectl get deploy api -o json gives you JSON; your GitOps repo wants YAML.
  • Docker Compose and Helm values. Turning a JSON config into values.yaml or docker-compose.yml.
  • CI pipelines. GitHub Actions, GitLab CI and CircleCI all use YAML.
  • OpenAPI specs. Many teams keep specs in YAML for readability and export JSON for tooling.

YAML gotchas the converter handles for you

  • Strings that look like other types. In YAML, unquoted yes, no, on and off can be read as booleans by older parsers, and 0123 can become a number. When you convert from JSON, strings that would be ambiguous are quoted automatically.
  • Indentation. YAML is whitespace-sensitive and tabs are not allowed. The output always uses spaces.
  • Long lines. Long strings are kept on one line instead of being folded, so values like connection strings and tokens are not altered.

Is it safe to paste config here?

Yes. The conversion uses the open-source js-yaml library and runs entirely in your browser tab. Nothing you paste is sent to Ryz Labs or anyone else. Even so, rotate any credential that has been pasted into places it shouldn't live.

FAQ

Is YAML a superset of JSON?

Mostly. YAML 1.2 was designed so that valid JSON is also valid YAML, which is why you can usually paste JSON straight into a YAML file. Converting to idiomatic YAML just makes it easier to read and review.

Why did my comments disappear?

JSON has no comments, and when YAML is converted to JSON the comments are dropped because JSON cannot hold them. Keep the YAML file as your source of truth if comments matter.

Does it support multiple YAML documents separated by ---?

The YAML to JSON direction reads a single document. For a multi-document file, convert each document separately.

Is there a size limit?

No fixed limit. Files of a few megabytes convert instantly in a modern browser.

Does it cost anything?

No. All tools on ryzlabs.com/tools are free, with no sign-up.

Ryz Labs

Need a DevOps or platform engineer on your team?

Ryz Labs places senior DevOps, platform and cloud engineers who work in your repos and report to your leads, on US business hours.

Start a conversation →