YAML to JSON

Paste YAML, get JSON. Handles the common YAML 1.2 subset most config files use.

Runs in your browser. Nothing is uploaded.
YAML in
JSON out

JSONYard's online YAML to JSON converter parses the common YAML 1.2 subset (block and flow mappings, sequences, typed scalars, comments) and outputs JSON. It runs entirely in your browser.

Curious why YAML keeps surprising people (the Norway problem, octals, indentation drift)? See JSON vs YAML vs XML.

What's supported

  • Block-style mappings and sequences with indentation
  • Scalars: strings (plain, single-quoted, double-quoted), numbers, booleans, null (null, ~, yes/no, on/off)
  • Flow style [1, 2, 3] and {a: 1}
  • Comments (#) and blank lines

Not supported (yet)

  • Anchors & and aliases *
  • Tags !!str etc.
  • Block scalars | and > (we treat them as plain strings)
  • Multiple documents separated by ---

Convert YAML configs to JSON for APIs

YAML rules configuration files; JSON rules wire formats. Convert your docker-compose.yml, Kubernetes manifest, GitHub Actions workflow, or Ansible playbook into JSON when you need to feed it to a JSON-only API, a templating engine, or a JSON Schema validator. Pair the output with the JSON Schema validator to enforce shape, or the JSON formatter to pretty-print.

FAQ

Is this safe to use on Kubernetes manifests?
For most plain manifests, yes. For Helm-rendered output that uses anchors, switch to kubectl get's built-in -o json output or use yq locally.
How do I convert YAML to JSON online without uploading?
Paste the YAML into the left pane — parsing runs in your browser. No file content leaves your device.
Why are some YAML strings becoming booleans?
The "Norway problem": unquoted yes, no, on, off, and true/false are parsed as booleans by YAML 1.1 semantics. Quote them to keep them as strings.

Related conversion tools