YAML to JSON Converter

  • Free forever
  • No sign-up
  • Runs in your browser
Processed on your device

Convert YAML to JSON and JSON to YAML - handy for Kubernetes, Docker Compose, GitHub Actions and config files.

About YAML to JSON Converter

Moves configuration between the two formats most tools use: YAML for Kubernetes, Docker Compose, GitHub Actions and Ansible, and JSON for APIs, scripts and JSON-only tools. Convert in either direction with 2 or 4 space indents. Files holding several YAML documents become a JSON array, and anchors and aliases are resolved into full copies, so the JSON is complete and ready to use.

How to use YAML to JSON Converter

  1. Paste YAML into the YAML box on the left, or JSON into the JSON box on the right.
  2. Choose an Indent of 2 or 4 spaces for the converted output.
  3. Click YAML → JSON or JSON → YAML to convert in that direction.
  4. Click Copy YAML or Copy JSON to paste the result into your config file.

How your data is handled

Conversion runs in your browser with the js-yaml library, loaded from our own site the first time. Passwords and keys in your config files aren't uploaded or stored.

How SAA Tool works · Privacy Center

Limits and accuracy

  • It reads YAML 1.2, so yes, no, on and off stay text, and 0755 is read as 755, not octal.
  • Custom tags, such as the Ref and GetAtt short forms in CloudFormation templates, cause an error instead of converting.
  • Merge keys (<<) aren't expanded; they come through as an ordinary key called <<.

Questions and answers

Are YAML comments kept?

No. JSON has no comments, so they're dropped when you convert to JSON, and they don't come back when you convert JSON to YAML. Keep a copy of the original if the comments matter.

What about files with several YAML documents?

A file with more than one document, separated by ---, becomes a JSON array with one item per document. That's common in Kubernetes manifests.

Why do I get a YAML error?

Usually it's indentation: a tab, or a line that doesn't line up with its neighbours. The message shows the line and column, so check the spacing there. YAML needs spaces, not tabs.

Are dates converted?

No. Values like 2026-10-01 stay as plain text strings in the JSON, exactly as written. Convert them in your own code if you need real date values.

Do I need to sign up?

No. YAML to JSON Converter is free with no sign-up, no login and no daily limit, and there's nothing to install. It works on a phone as well as a PC.

Is my text sent to a server?

No. YAML to JSON Converter runs in your browser, so what you paste stays on your device. That makes it safe for passwords, tokens, customer data and anything else private.

Does it handle Swagger and OpenAPI files?

Yes. Paste the YAML and you get the equivalent JSON, with anchors resolved, and the JSON → YAML button goes the other way.

Sources and standards

Related guides

Report a problem with this tool