Convert between YAML and JSON in both directions, with syntax errors shown by line number
| and >), anchors (&) with aliases (*), and skipping comments are supported. Comments are not preserved when converting YAML to JSON, because JSON has no comment syntax.
Paste YAML into the left input and press "YAML → JSON" to get JSON on the right, or paste JSON into the right input and press "JSON → YAML" to get YAML on the left. It is handy when you want to work with configuration files such as Kubernetes manifests, GitHub Actions workflows, or Docker Compose files as JSON, or the other way around.
The data structure and values are preserved as they are. However, presentation details of YAML such as comments, anchor names, and whether strings are quoted do not exist in JSON, so they are lost in conversion. Anchors and aliases are expanded into the actual referenced values.
In YAML, common mistakes are uneven indentation (tabs are not allowed), a missing space after a colon (key:value is wrong; key: value is correct), and a missing space after a list hyphen. When an error appears, check around the reported line number.
The conversion uses js-yaml, a proven library that follows YAML 1.2. It can read the notation commonly used in configuration files, including maps, lists, nesting, multi-line strings, and anchors with aliases. Special YAML that relies on custom tags is out of scope.
When the YAML syntax is invalid, the error message is shown together with the line number and character position. This helps you locate common mistakes such as uneven indentation or a missing space after a colon. Errors on the JSON side also show an error message.
No. The conversion runs entirely in JavaScript within your browser. The YAML and JSON you enter are never sent to or stored on any server.