Skip to content

YAML to JSON Converter

Convert YAML to JSON and back, in your browser.

Runs in your browser

Pick a direction. Block sequences, mappings, scalars and inline flow are supported. Anchors, multi-document and tags are out of scope - see the FAQ.

How to use it

  1. Pick a direction

    YAML to JSON or JSON to YAML.

  2. Paste your source

    Sample is pre-filled. Indent with spaces, not tabs.

  3. Copy the output

    Output appears in the right pane; copy button next to the heading.

What is it?

YAML and JSON describe the same value space (objects, arrays, scalars) in different syntaxes. JSON is more strict and widely embedded; YAML is friendlier for human-edited config. A converter lets you move config between systems without retyping or making indentation mistakes.

When to use it

Translating a Kubernetes manifest into JSON for an API call. Reading a CI config in JSON form. Generating a starter config from JSON sample data. Comparing two configs that arrived in different formats.

Common mistakes

Forgetting that YAML treats `yes`, `no`, `on`, `off` as booleans (the 'Norway problem'). Mixing tabs and spaces - YAML rejects tabs for indentation. And expecting comments to survive a round-trip: JSON has none, so YAML -> JSON drops comments forever.

FAQ

Are YAML anchors / aliases supported?
No. Multi-document (---), tags (!!str, !!int) and folded/literal scalars (>, |) are also unsupported. For those, run yq or a full parser.

More in this category