YAML → JSON Converter

Paste YAML on the left, get clean JSON on the right. Private by design—everything runs locally in your browser.

YAML Input & Actions

Tip: Drag & drop a .yml/.yaml file onto the box. Press Ctrl/Cmd + Enter to convert.

JSON Output

About this tool

This converter parses your YAML text entirely in your browser using a local JavaScript parser and outputs equivalent JSON. No files or data ever leave your device—ideal for sensitive configs or credentials you don’t want to upload.

Tips

  • Use Indent to control pretty‑printing width. Set to 0 to minify.
  • Sort keys makes diffs easier when tracking changes in Git.
  • Remove nulls strips properties with null values from objects after conversion.

Common YAML gotchas

  • Indentation matters—use spaces, not tabs.
  • Quote strings that look like numbers/dates if you need exact strings.
  • Arrays can be inline ([a, b]) or multi‑line with dashes (- a).

Privacy

100% client‑side. This page performs all parsing locally with no network requests (aside from the initial page load).

Common YAML gotchas

  • Indentation matters—use spaces, not tabs.
  • Quote strings that look like numbers/dates if you need exact strings.
  • Arrays can be inline ([a, b]) or multi-line with dashes (- a).

5 Fun Facts about YAML ⇄ JSON

Kubernetes secretly converts

Most kubectl YAML you write is turned into JSON before it hits the API server—your manifests are JSON on the inside.

Cloud twist

Comments vanish

YAML allows # comments, but JSON doesn’t. When you convert, the data survives but the commentary disappears.

Silent notes

Anchors become copies

YAML anchors/aliases (&ref / *ref) flatten into duplicated values in JSON because JSON has no references.

Dedup trick

JSON is already valid YAML

YAML 1.2 treats pure JSON as valid YAML, so you can paste JSON straight into the left box and still convert or prettify it.

Spec overlap

Order isn’t guaranteed

JSON objects are unordered by spec. Sorting keys before conversion keeps Git diffs calmer when order doesn’t matter.

Stable diffs

Explore more tools