Skip to content

YAML to JSON converter

Turn YAML configs into JSON — with errors pinpointed, nothing uploaded.

Runs in your browser — files never leave your device
YAML
JSON

Convert YAML to JSON locally

Going from YAML to JSON is usually about feeding a config to something that only speaks JSON — an API, a test fixture, jq, a JSON Schema validator — or about seeing what a YAML file actually means once indentation, anchors and implicit types are resolved. That second use is underrated: if a deployment behaves strangely, the JSON view shows exactly what the parser understood.

Configs are where credentials live, so the conversion runs in your browser. Errors point to the line and column where parsing stopped, which for YAML is usually an indentation slip or a tab character.

What YAML features become in JSON

  • Comments are dropped — JSON has nowhere to put them.
  • Anchors and aliases (&base and *base) are expanded, so a shared block appears in full everywhere it is referenced.
  • Multi-line strings written with | or > become ordinary strings with \n line breaks.
  • Multiple documents separated by --- are rejected with a clear error; convert them one at a time.

For checking or pretty-printing the JSON you get, the JSON formatter shows it as a collapsible tree.

Other conversions with this tool

How to convert YAML to JSON

  1. 1

    Paste your YAML into the left pane.

  2. 2

    Formatted JSON appears live on the right.

  3. 3

    Fix any error at the line it points to.

YAML to JSON — frequently asked questions

Is my YAML uploaded anywhere?

No. The conversion runs in your browser, and this site has no server that could receive your YAML. A Content-Security-Policy blocks requests to other domains; you can confirm in DevTools → Network or by going offline.

What happens to YAML comments?

JSON has no comments, so they are dropped. Everything else — nested maps, lists, multi-line strings — converts directly.

Can it convert a file with several YAML documents (---)?

It converts a single document. For a multi-document file such as a Kubernetes bundle, paste one document at a time.