Tools/YAML to JSON
100% Client-Side • No Uploads

YAML to JSON Converter

Convert config between YAML and JSON in both directions. Use the swap button to flip the conversion and reuse the last result as the new input. Errors show inline.

Input YAML
Output JSON

YAML and JSON, and where they differ

JSON is a strict data format: double-quoted keys, no comments, no trailing commas. YAML is a friendlier superset aimed at humans, so every JSON document is already valid YAML, but YAML adds comments, anchors, multi-line block scalars, and unquoted values whose type is inferred. That inference is the usual source of surprises: no and off parse as booleans, and 1.10 parses as a number, so version strings and country codes need quotes. This converter parses YAML with js-yaml, then serializes to JSON with two-space indentation, or parses JSON and dumps clean YAML. Comments are dropped going to JSON because the format cannot represent them, and anchors are expanded to their values. The swap button flips the direction and feeds the previous output back in so you can round-trip a document. Everything runs locally. Next, tidy the JSON side with the JSON Formatter or scan config for leaked keys with the Secret Scanner.

Frequently Asked Questions