YAML ↔ JSON Converter
YAML (YAML Ain't Markup Language) and JSON are both popular data serialization formats. YAML is more human-readable with its indentation-based syntax, while JSON is more widely supported by APIs and programming languages. This tool converts between them instantly.
YAML vs JSON YAML supports comments, multi-line strings, and complex data types with a clean syntax. JSON is more strict but universally supported. Converting between them is a common task when working with configuration files (Docker Compose, Kubernetes, GitHub Actions) and APIs. All processing happens locally in your browser.
Free online tool for converting between YAML and JSON formats. YAML (YAML Ain't Markup Language) is a human-friendly data serialization format widely used in configuration files for Docker, Kubernetes, GitHub Actions, Ansible, and many other DevOps tools. JSON is the universal data interchange format for APIs and web applications.
The converter uses the js-yaml library for accurate YAML parsing that supports all YAML 1.2 features: nested structures, arrays, multi-line strings, anchors, and aliases. Error messages include line numbers for quick debugging. You can configure indentation size for both JSON (2 or 4 spaces) and YAML output.
All processing happens locally in your browser — your data is never sent to any server. Perfect for DevOps engineers working with Kubernetes manifests, developers converting API responses, and anyone who needs to transform data between YAML and JSON formats.
How to use it
- Paste YAML into the left field and JSON appears on the right, and vice versa — conversion works both ways.
- Set the indent (2 or 4 spaces) for readable output or enable compact mode.
- Syntax errors are highlighted with a line number so you can find a stray space or an unclosed quote.
When it helps
- Kubernetes and Docker Compose: convert a manifest to JSON for an API or back to YAML for a readable commit.
- CI/CD: check a GitHub Actions or GitLab CI configuration for syntax errors before pushing.
- Application configs: migrate settings between formats without rewriting by hand.
Frequently asked questions
Are comments lost in conversion?
Yes: JSON has no comments, so they disappear when converting YAML → JSON. There are none in the other direction either.
Why did yes turn into true?
In old YAML 1.1 the words yes/no/on/off were booleans. The converter follows YAML 1.2, where only true and false are booleans, but some tools still treat yes as true — quote such strings.
What about anchors and aliases (&, *)?
Anchors are expanded: in JSON every place gets a full copy of the value, since JSON has no references.