YAML ↔ JSON Converter
Paste YAML to get JSON, or JSON to get YAML.
Why convert between them
YAML is easier for humans to read and hand-edit — used for config files like Kubernetes manifests and CI pipelines — while JSON is the format most APIs and programming languages parse directly. Converting lets you edit comfortably in one and ship in the other.
About the YAML ↔ JSON Converter
YAML to JSON Converter converts YAML to JSON and JSON to YAML. YAML is popular for configuration files such as Docker Compose, Kubernetes and CI pipelines, while JSON is common in APIs.
YAML is a superset of JSON in practice, so valid JSON can usually be read as YAML. YAML uses indentation and supports comments, which JSON does not, so comments are lost when converting to JSON. Indentation errors are the most common YAML problem, and tabs are not allowed for indentation.
How to use it
- Paste YAML and press YAML → JSON, or paste JSON and press JSON → YAML.
- Read the output.
- Fix errors reported.
- Copy the result.
Tips and good to know
- Use spaces, not tabs.
- Quote strings that look like numbers or booleans if needed.
- Comments cannot be kept in JSON.
Frequently asked questions
Are comments preserved?
No.
Why does "yes" become true?
Some YAML versions read it as boolean; quote it if needed.
Is it private?
Yes.