Convert Dock

pick a converter · runs entirely in your browser
dark

YAMLJSON

keys 0 lines 0
YAML
drop a .yaml file here0 bytes
YAML
JSON
JSON
drop a .json file here0 bytes

What is a YAML to JSON converter?

YAML is a human-friendly data format built around indentation instead of brackets and braces, which makes it a popular choice for configuration files — Docker Compose, GitHub Actions workflows, Kubernetes manifests, and Ansible playbooks are all typically written in YAML. It supports comments, multi-line strings, and references (anchors), none of which JSON has.

JSON, meanwhile, is what most APIs, logging tools, and programming languages expect natively. Converting between the two lets you read or edit a YAML config as plain JSON data, or take JSON output from an API and turn it into a more readable YAML file.

Frequently asked questions

What happens to YAML comments when converting to JSON?
They're removed. JSON has no comment syntax, so there's no way to preserve them — this is an unavoidable, one-way loss when converting in this direction.
Does it support YAML anchors and aliases (& and *)?
Yes — this converter uses the well-established js-yaml library, so YAML's more advanced features like anchors, aliases, and multi-line strings are parsed correctly rather than handled with a simplified, hand-rolled parser.
Does this converter need an internet connection?
The YAML parser and generator are loaded from a CDN the first time you use this module, in either direction. Once loaded, all the actual conversion still happens locally in your browser — nothing you paste is ever sent anywhere.