Convert between YAML and JSON formats instantly. Pure client-side.
Convert ยท YAML ยท JSON
Convert YAML to JSON and JSON to YAML in your browser. Handy for Kubernetes manifests, GitHub Actions, Ansible snippets, and API samples when one tool wants YAML and another wants JSON.
JSON is strict, ubiquitous in HTTP APIs, and easy for machines. YAML is indentation-based and friendlier for long configs with comments (in YAML 1.1/1.2 workflows). Many systems accept both; humans often edit YAML then need JSON for an API, or receive JSON and want YAML for a Helm values file.
| Gotcha | What happens | Mitigation |
|---|---|---|
Unquoted NO, ON | May become booleans in YAML 1.1 | Quote strings that look like booleans |
| Leading zeros | May parse as octal/sexagesimal in some loaders | Quote ids like "00123" |
| Indentation | Structure changes with spaces | Use consistent 2-space indents |
| Duplicate keys | Loader-defined behavior | Avoid duplicates; prefer JSON for strictness |
| Comments | Lost when converting to JSON | Keep comments only in YAML source of truth |
Kubernetes tip: Manifests are YAML-first, but the API speaks JSON. Converting can help debug kubectl errors โ still apply with server-side validation, not only local conversion.
# YAML
service:
name: api
ports:
- 8080
- 8443
# JSON
{
"service": {
"name": "api",
"ports": [8080, 8443]
}
}
No. Standard JSON has no comments. Convert back to YAML only restores structure, not original comments.
No โ it runs in the browser. Privacy Policy.
---)?Support varies. Split documents if the converter targets a single tree.