YAML ↔ JSON Converter

Paste YAML on the left, get JSON on the right (or paste JSON on the right, get YAML on the left). Errors highlighted with line numbers. Everything stays in your browser.

What's the difference between YAML and JSON?

JSON is a strict subset of JavaScript object literal syntax — terse, machine-friendly, finicky about quotes and commas. YAML (YAML Ain't Markup Language) is a superset of JSON with much friendlier human syntax: indentation instead of braces, optional quoting, comments, anchors and aliases for repetition.

Every valid JSON document is also valid YAML. The reverse is not true — YAML has features (tags, anchors, multi-document streams) that don't exist in JSON.

Common gotchas

YAML 1.1 vs 1.2

Most software uses YAML 1.1 (older). The 1.2 spec (2009) tightened rules — booleans are only true/false, no more YES/NO; numbers must be standard decimal. JSON is fully compatible with YAML 1.2. js-yaml (this tool's parser) defaults to 1.2 in load mode.

Privacy

The conversion runs entirely in your browser via the open-source js-yaml library (MIT-licensed) embedded into this page. Your input is not sent anywhere.