What is YAML?
YAML is a human-friendly data format that uses indentation instead of braces and commas. It is common in configuration files, CI pipelines, infrastructure definitions, and developers' tooling. Its structure maps directly onto JSON's objects, arrays, strings, numbers, booleans, and nulls.
This converter works in both directions: YAML to JSON for feeding configuration into tools, and JSON to YAML when you need a configuration file for a project that expects YAML.
Converting YAML to JSON
A YAML document parses into a value, then serializes to JSON with your chosen indentation. The conversion is a data conversion, not a byte-for-byte copy: comments are dropped, scalar styles are normalized, and key order is preserved from the source document.
# in: YAML -> JSON
service: techfixgen
versions: [2, 3]
owner:
name: Ada Lovelace
enabled: true
# out:
{
"service": "techfixgen",
"versions": [2, 3],
"owner": {
"name": "Ada Lovelace"
},
"enabled": true
}Supported syntax
Parsing uses the YAML 1.2 core schema. That includes scalars for strings, integers, floats, booleans, and null, block and flow collections, quoted strings, comments, anchors, aliases, and multi-document files.
- Anchors and aliases (&name / *name, and merge keys) are resolved to their expanded values in the JSON output.
- Tags beyond the core schema such as
!!timestamp, !!binary, and !!set are not converted to JavaScript-specific types; the core schema applies instead. - Comments are ignored during parsing and do not appear in the JSON output.
- Duplicate mapping keys are rejected with a parse error instead of silently keeping one.
Converting JSON to YAML
JSON is a subset of YAML's data model, so any valid JSON document converts cleanly. Values are written with YAML block style, string values are quoted only when needed, unicode is preserved, and a --- document marker is emitted when the value is a sequence.
Limits and safety
The parser runs in a restricted core-schema mode with duplicate-key detection and a cap on alias expansion, so untrusted configuration cannot build JavaScript objects or exhaust the page with deeply nested aliases. JSON cannot represent circular references, timestamps, or binary data, so documents that need those features cannot round-trip exactly.
Privacy
Conversion runs entirely in your browser. The YAML and JSON documents you paste are not uploaded to TechFixGen servers and are not included in analytics events. No account or signup is required. Need to check a JSON document first? Try the JSON Validator.