We use essential storage to make the site work. If you accept, we also use Google Analytics to understand usage and Google AdSense to show ads, which may set cookies. You can change your choice any time with Cookie settings in the footer. Privacy Policy
YAML to JSON & JSON to YAML — Free Online Converter
Free online YAML ↔ JSON converter. Convert Kubernetes, GitHub Actions, OpenAPI, and other YAML to JSON and back. Runs locally in your browser. Free online.
How to use
Choose Direction — Select YAML → JSON or JSON → YAML.
Paste Input — Paste your YAML or JSON document.
Copy Output — Copy or swap to convert back.
Frequently asked questions
Which YAML version is supported?
The converter uses js-yaml, which implements YAML 1.2 with safe loading by default. Custom tags are not executed.
Are anchors and aliases supported?
Yes. js-yaml resolves anchors (&) and aliases (*) when converting YAML to JSON.
What happens to comments?
JSON has no comment syntax, so YAML comments are dropped in the YAML → JSON direction. JSON → YAML output contains no comments either.
Why does my YAML produce a different shape?
Check indentation. YAML uses spaces for nesting, and one inconsistent line can change the entire structure.
Is my data sent anywhere?
No. Parsing runs locally in your browser; no upload occurs.
YAML to JSON & JSON to YAML — Free Converter
Switch between YAML and JSON in both directions, instantly. Paste a Kubernetes manifest, GitHub Actions workflow, OpenAPI spec, or any config and get the equivalent JSON — or vice versa. The tool runs locally in your browser, so even private infrastructure files stay on your machine.
Why Convert YAML to JSON?
YAML is the configuration language of choice for DevOps tooling — Kubernetes, Helm, Ansible, GitHub Actions, GitLab CI, and Docker Compose all use it. JSON, by contrast, is the data interchange standard for APIs and tooling. Converting between them is a daily task for SREs, platform engineers, and full-stack developers.
How the Converter Works
YAML → JSON parses your YAML using js-yaml's safe loader and serializes the resulting object with JSON.stringify. JSON → YAML does the reverse with yaml.dump, producing block-style YAML with two-space indentation. Both directions preserve nested objects, arrays, and primitive values.
Common Use Cases
Kubernetes manifests: Convert YAML deployments to JSON for kubectl --output=json or for tooling that requires JSON input.
OpenAPI specs: Swap between formats when integrating with tools that prefer one over the other.
CI/CD configs: Validate GitHub Actions or GitLab pipelines by converting to JSON and inspecting structure.
Migration: Move legacy JSON configs to readable YAML, or compress YAML to compact JSON.
Privacy
All conversion happens in your browser. The tool never uploads your manifests or configs, which makes it safe for cluster definitions and other sensitive infrastructure files.