YAML ⇔ JSON Converter

Convert YAML to JSON or JSON to YAML instantly in your browser.

Direction
YAML Input
JSON Output

About YAML and JSON

YAML (YAML Ain't Markup Language) is a human-friendly serialization format popular in configuration files — Docker Compose, Kubernetes manifests, GitHub Actions workflows, and more. JSON (JavaScript Object Notation) is the standard for data interchange between APIs and web services.

This tool converts between the two formats entirely in your browser. No data leaves your machine. The YAML parser handles the most common real-world patterns.

Supported YAML features

Supported: key-value pairs, nested objects (indentation), block sequences (- item), single and double-quoted strings, unquoted scalars, booleans (true/false/yes/no/on/off), integers, floats, null/~, and comments (#).

Not supported: anchors & aliases (&/*), multi-document streams (---), block scalars (|/>), and flow-style collections ({}/[] at the value level). Use a full YAML library for these cases.

Frequently asked questions

What is YAML?
YAML (YAML Ain't Markup Language) is a human-readable data serialization format. It uses indentation for structure and is widely used for configuration files in DevOps tools.
Is YAML a superset of JSON?
Yes. Any valid JSON document is also valid YAML 1.2. YAML adds comments, multiline strings, anchors/aliases, and a more readable syntax on top of JSON's feature set.
When should I use YAML vs JSON?
Use YAML for human-edited config files (Kubernetes, CI/CD, Docker Compose). Use JSON for machine-to-machine data exchange and REST APIs where strict parsing and broad library support matter.
Are anchors and aliases supported?
No. This lightweight in-browser parser handles common YAML patterns only. Anchors (&), aliases (*), and multi-document streams (---) are not supported. An error will be shown for unsupported syntax.

Related tools