Skip to main content

YAML to JSON Converter

Runs locally

Parse single or multi-document YAML into formatted JSON with line-level diagnostics.

What is YAML to JSON Converter?

Parse YAML 1.2 documents, Kubernetes manifests, and GitHub Actions workflows into strict JSON. Detects indentation and anchor errors with exact line numbers.

How to use YAML to JSON Converter

  1. Step 1

    Paste YAML into the input editor or drop a .yml/.yaml file.

  2. Step 2

    Select output JSON indent (2 spaces, 4 spaces, or minified).

  3. Step 3

    Copy or download the converted JSON.

Features

  • YAML 1.2 compliant parser with anchor and alias resolution
  • Multi-document YAML stream support
  • Exact line and column syntax diagnostics
  • Configurable JSON indentation or compact output
  • Lossy-conversion warning when comments are stripped
  • Swap button to convert JSON back to YAML

Example

Input

name: nexatools
ports:
  - 80
  - 443

Output

{
  "name": "nexatools",
  "ports": [
    80,
    443
  ]
}

YAML sequences and mappings become standard JSON arrays and objects.

Frequently asked questions

Does it support YAML anchors and aliases?

Yes, YAML anchors (&name) and aliases (*name) are resolved into JSON values.

Why did my YAML fail to parse?

YAML prohibits tab indentation and requires a space after colons; the Problems panel marks the exact line.

Is my YAML config sent to a server?

No, parsing happens locally in your browser.

Can I convert the output to TypeScript?

Yes, click Open in JSON to TypeScript below the output editor.