JSON ↔ YAML
Convert between JSON and YAML documents.
What is the JSON ↔ YAML?
JSON and YAML describe the same data shapes, so conversion between them is mechanical. YAML is easier to hand-edit and supports comments, which is why configuration files use it; JSON is stricter and universally parseable, which is why APIs use it.
Frequently asked questions
Will comments in my YAML survive conversion to JSON and back?
No. JSON has no comment syntax, so comments are lost at the JSON step and cannot be recovered. Convert in one direction for a one-off migration, and keep YAML as the source of truth if comments matter.
Why did my YAML value "yes" become true?
Older YAML parsers coerce yes, no, on and off to booleans, which famously breaks country codes such as NO. Quote the value to force it to stay a string.
Related Converters
- Unix TimestampConvert between Unix timestamps and human dates.
- CSV ↔ JSONConvert tabular CSV data to JSON and back.
- Image Format ConverterConvert images between PNG, JPEG, WEBP and SVG with drag-and-drop.
JSON ↔ YAML is one of 4 tools in Converters on Toolkit Hub, a free collection of browser-based utilities. It requires no account and no installation. Browse all tools.