JSON ⇄ YAML Converter
Convert JSON to YAML or YAML to JSON in either direction, in your browser.
How this tool works
Pick a direction
Switch between JSON → YAML and YAML → JSON with a single click.
Paste your content
A config file, a manifest, or a JSON object - js-yaml handles the real parsing.
Get spec-compliant output
Anchors, multi-line strings, and type inference are handled the way a real YAML parser would.
Copy or swap
Grab the converted result, or swap it back in to reverse the conversion.
Quick facts
- Category
- Converters
- Best for
- Converting a Kubernetes manifest between JSON and YAML
About this tool
Switch between JSON → YAML and YAML → JSON with a single click and get live output as you type, powered by js-yaml - a widely used, spec-compliant YAML parser rather than a hand-rolled one, so edge cases like anchors, multi-line strings, and YAML’s flexible scalar syntax (unquoted booleans, null values, numbers) are handled the way a real YAML consumer would interpret them. This matters because YAML is far more permissive than JSON - the same data can be written many different ways - so a naive line-based converter would silently mishandle things a proper parser gets right out of the box. Useful for converting between Kubernetes manifests and JSON tooling, editing YAML config files with JSON-aware editors, or just reading a YAML file’s structure more explicitly as JSON. Runs entirely client-side.
Why use this tool
Real YAML parser under the hood
Uses js-yaml, a spec-compliant library, instead of a line-by-line converter that mishandles edge cases.
Handles YAML’s flexibility
Anchors, block vs. flow style, and unquoted booleans/nulls all parse correctly.
Built for config files
Well suited to Kubernetes manifests, CI configs, and other YAML-heavy DevOps files.
Both directions, one tool
No need to hunt for a separate converter depending on which format you’re starting from.
Frequently asked questions
YAML’s syntax is considerably richer than JSON’s - it supports anchors and references, multiple ways to write the same scalar value, block and flow styles, and type inference for things like unquoted "true"/"false"/"null" - so a naive line-based converter would get many real-world YAML files wrong. js-yaml implements the YAML specification properly, which is why this tool uses it instead of parsing YAML by hand.
They’re dropped - JSON has no concept of comments, so there’s no lossless way to represent a YAML comment in the JSON output. If you convert YAML to JSON and back to YAML, expect the comments from the original file to be gone in the round-tripped result.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools