Browser-local developer utility

YAML and JSON Converter

Convert common YAML mappings, sequences, scalars, anchors, aliases, and multi-document input to JSON—or strict JSON back to YAML.

Enter source and select Convert.

Method and example

js-yaml 4.1.0 parses common YAML using its safe default schema. Multiple YAML documents become a JSON array. Reverse conversion begins with strict JSON parsing and emits deterministic YAML.

The YAML “name: Josh”, “active: true”, and “count: 3” produces an object retaining string, Boolean, and number types. JSON arrays and objects round-trip semantically.

Scope and limitations

YAML comments and original formatting cannot survive conversion through JSON. Custom unsafe JavaScript tags are rejected. Input is limited to 5 MB UTF-8.

All output remains inert text. User source is never executed in the main page or sent to a remote parser.

Related developer tools

Browse Developer Tools.