YAML to JSON converts between YAML and JSON in both directions, using the js-yaml library. Paste YAML to get JSON, or press Swap to turn JSON into YAML. Conversion is live, and parse errors are shown with their message.
YAML relies on indentation and has some surprising rules, such as unquoted yes and no becoming booleans in older parsers. Seeing the JSON equivalent is the fastest way to confirm what a YAML file actually means to a program.
Advertisement
How to use YAML to JSON
1
Paste YAML or JSON
Use Swap to change direction.
2
Review the output
It updates as you type.
3
Copy
Use the copy button.
Use Cases
- Checking a Kubernetes or Docker Compose file
- Converting an OpenAPI spec between formats
- Debugging a CI configuration
Frequently Asked Questions
Almost always indentation: tabs instead of spaces, or inconsistent nesting.
No. JSON has no comments, so they are dropped.
Yes. YAML is a superset of JSON.
Yes, YAML to JSON is 100% free with no usage limits, no watermarks, and no hidden charges. The platform is supported by non-intrusive advertising so all tools stay free for everyone.
Yes. YAML to JSON runs entirely in your browser using client-side JavaScript. Your files and data never leave your device and are never transmitted to our servers.