JSON vs YAML

JSON uses explicit braces, brackets, and quoted keys. YAML can express the same common data structures with indentation and compact list markers, making configuration easier to scan but more sensitive to whitespace.

Convert JSON to YAML

Objects, arrays, strings, finite numbers, booleans, and null values are parsed as JSON before the YAML library serializes them. Indentation can be set to two or four spaces.

Convert YAML to JSON safely

The parser enforces unique keys, limits aliases, rejects custom YAML tags, and never loads external references. Multiple-document streams are detected instead of silently discarding later documents.

YAML indentation and security

Indentation defines nesting in YAML. Untrusted YAML should always be parsed with bounded aliases and without application-specific constructors; this tool uses those safer defaults.

Frequently asked questions

Can this create custom classes from YAML?

No. Custom tags and object-construction extensions are rejected.

Does it support multiple YAML documents?

Not currently. A stream containing multiple documents receives a clear error.