YAML ↔ JSON Converter & Validator
Validate YAML and JSON and convert between them, with clear error messages.
● Runs 100% in your browser — nothing you type leaves this page.
How to use it
- Paste YAML or JSON on the left. The tool detects which one it is — or choose the direction yourself.
- The converted result appears on the right; copy it with one click.
- If the input has an error, you get the line and column, so you can fix a broken Kubernetes manifest, Compose file or CI pipeline before it reaches the server.
Nothing is uploaded: the conversion runs in your browser, so it’s safe for configuration files.
What it understands
- Anchors and aliases (
&default/*default) and merge keys (<<: *default), common in Docker Compose and GitLab CI files — resolved in the JSON output. - Several documents in one file (separated by
---, like many Kubernetes manifests) — converted to a JSON array. - YAML 1.2 rules, the current standard.
Warning
yes, no, on, off: in YAML 1.2 (this tool, and most modern parsers) they’re plain strings. Older parsers that follow YAML 1.1 — PyYAML, for example — read them as true / false. If a value must be a string everywhere, quote it: "no".
Common YAML errors
| Error | Usual cause |
|---|---|
| Tabs in indentation | YAML allows only spaces for indentation |
Nested mappings are not allowed in compact mappings |
A key: value where the value itself contains : — quote the value |
Implicit keys need to be on a single line |
A missing : or a wrong indentation on the line before |
Map keys must be unique |
The same key twice in one mapping |
| A list item at the wrong level | - indented differently from its siblings |
Docker Compose, kubectl and Python report the colon problem as mapping values are not allowed: see that article for both causes.
FAQ
Is JSON valid YAML?
Yes — YAML 1.2 is a superset of JSON, so any JSON document is also valid YAML. The opposite isn’t true: comments, anchors and unquoted strings only exist in YAML.
Why did my comments disappear?
JSON has no comments, so they’re lost when converting YAML to JSON — and converting back can’t restore them.
Articles
Learn more
Kubernetes "Forbidden: User cannot list resource": give exactly the rights it needs with RBAC
Fix Kubernetes "Forbidden: User cannot list resource": read who and what is missing, test with kubectl auth can-i, then add a Role and RoleBinding.
Intermediate · 4 min read
Ansible "UNREACHABLE! Failed to connect to the host via ssh": find the real SSH error
Fix Ansible UNREACHABLE: read the SSH error in the message, check the inventory, reproduce with -vvv and plain ssh, then fix keys, users or host keys.
Beginner · 4 min read
Kubernetes ImagePullBackOff and ErrImagePull: find out why the image won’t pull
Fix ImagePullBackOff: read the pull error in kubectl describe, then fix the image name or tag, registry credentials, Docker Hub rate limits, network or architecture.
Beginner · 4 min read
Kubernetes pod stuck in Pending: "0/3 nodes are available: Insufficient cpu"
Fix pods stuck in Pending: read the FailedScheduling event, then fix CPU and memory requests, taints, node selectors, volumes or the cluster size.
Intermediate · 4 min read
Kubernetes CrashLoopBackOff: 7 causes and how to find yours
CrashLoopBackOff means the container keeps exiting. Read the exit code and the previous logs, then fix the crash, OOM kill, probe or command.
Intermediate · 6 min read