YAML to JSON

Convert YAML configs — including comments, anchors, and aliases — back to structured JSON instantly in your browser.

Input
OutputREADY

Anchors & Aliases Resolved

Expands YAML anchors and aliases into their full values, with built-in protection against anchor-bomb style input.

Clear Error Messages

Reports clear, position-aware error messages for malformed YAML.

Local Processing

Your data never leaves your browser. Privacy first conversion.

How to Convert YAML to JSON

  1. Paste your YAML — application configs, Kubernetes manifests, CI definitions, including ones using anchors and aliases.
  2. Click Convert.
  3. Structured, indented JSON appears in the output pane.
  4. Feed it to anything that speaks JSON: APIs, JSON.parse, jq, schema validators.

Example: Anchors and Aliases, Fully Expanded

Input — YAML with an anchor (&) and aliases (*)

regions: &shared
  - eu-west-1
  - us-east-1
primary: *shared
backup: *shared

Output — JSON

{
  "regions": [
    "eu-west-1",
    "us-east-1"
  ],
  "primary": [
    "eu-west-1",
    "us-east-1"
  ],
  "backup": [
    "eu-west-1",
    "us-east-1"
  ]
}

JSON has no reference syntax, so each *shared alias is expanded into a full copy of the anchored list — the standard, correct translation.

What YAML features become in JSON

Anchors and aliases expand into copies, comments disappear (JSON has nowhere to put them), and YAML’s unquoted scalars resolve to real types — true becomes a boolean, 3 becomes a number. Converting is a quick way to see what a YAML parser actually understands your config to mean, which is occasionally not what the indentation suggested.

Protected against malicious YAML

Alias expansion is exactly the mechanism behind "billion laughs" YAML bombs — tiny documents that expand into gigabytes. The converter enforces the yaml library’s built-in expansion limits, so a hostile document errors out instead of freezing your tab.

Frequently Asked Questions

Related Tools