How to use the YAML to JSON Converter tool
- Paste your YAML.
- Choose the indentation for the JSON.
- Copy or download the result.
YAML in daily DevOps work
YAML is everywhere in infrastructure: Kubernetes manifests, Docker Compose, Ansible playbooks, GitHub Actions and GitLab CI. It is easy to read, but its reliance on indentation makes small mistakes easy and hard to spot. Converting to JSON is a quick way to see the real structure the parser understood.
Classic YAML traps
- Tabs are not allowed for indentation. Use spaces only.
- The Norway problem: in YAML 1.1, unquoted no, yes, on and off become booleans, so the country code NO turns into false. Quote values when in doubt.
- Numbers and versions: version: 1.10 becomes the number 1.1. Write "1.10".
- Times and octals: 22:22 may be read as a number in base 60 by some parsers, and 0755 as an octal number.
- Multiple documents separated by --- become a JSON array here.
This converter follows YAML 1.2 (core schema), which fixes the Norway problem. Some tools, including older Python and Ruby libraries, still use YAML 1.1 rules, so quoting ambiguous values is the safe habit.
Privacy
Everything runs in your browser. Nothing you type is sent to our server or stored.
Debugging with JSON
When a deployment fails with a vague error like “expected a map” or “cannot unmarshal”, converting the YAML to JSON shows exactly how the parser read it: which keys are nested where, which values became numbers or booleans, and whether a list is really a list. A key that was indented one space too far shows up immediately as a child of the wrong parent.
Other uses
- Send configuration to an API that accepts only JSON.
- Compare two YAML files by converting both to JSON and using a diff tool.
- Feed configuration into tools like jq for quick queries.
- Store settings in a database or a JavaScript project that already uses JSON.
Frequently asked questions
Is YAML a superset of JSON?
Yes, YAML 1.2 can read any JSON document.
Are comments kept?
No. JSON has no comments, so they are dropped during conversion.
What about anchors and aliases (&, *)?
They are resolved, so the JSON contains the expanded values.
Can I convert the other way?
Yes, use the JSON to YAML converter.
Is my YAML sent to a server?
No. Conversion runs in your browser. Still, remove passwords and secrets from configuration files before pasting them into any online tool.
Why does the converter report an error my tool ignores?
Some tools accept non-standard YAML or use the older YAML 1.1 rules. Fix the reported line, or check the YAML version your tool expects.
