YAML to JSON Converter
Convert YAML to JSON, or JSON back to YAML, as you type. Runs in your browser.
JSON
YAML vs JSON
- YAML is easier for people to write and read: indentation instead of brackets, and comments are allowed. It is common in Kubernetes, Docker Compose, GitHub Actions and app config.
- JSON is stricter and what most APIs and programming languages expect. Every valid JSON document is also valid YAML.
Frequently asked questions
How do I convert YAML to JSON?
Paste your YAML on the left. The JSON appears on the right as you type, and you can copy or download it.
Can it convert JSON back to YAML?
Yes. Switch the direction to "JSON to YAML" and paste your JSON.
Is my data uploaded?
No. The conversion runs in your browser, so config files and secrets in them never leave your device.
Why does my YAML fail to convert?
The most common causes are tabs used for indentation (YAML only allows spaces), inconsistent indentation within a list, and a missing space after a colon. The error message shows the line and column.
What happens to YAML comments?
JSON has no comments, so comments are dropped when converting YAML to JSON.
Related free tools
JSON formatter · JSON to CSV · Diff checker · Base64 encoder