YAML to JSON Converter
Convert YAML to JSON and JSON back to YAML in your browser. Handles anchors, ali...Convert YAML to JSON and JSON back to YAML in your browser. Handles anchors, aliases, multiline blocks, and real types, with a direction toggle and in...
Updated
YAML Input
JSON Output
YAML and JSON at a glance
name: Adaskills:
- go
- rustaddress:
city: Londonactive: true, age: 30, x: nullQuick answer
To convert YAML to JSON, paste your YAML into the input box and the tool parses it in your browser and shows the JSON instantly. It uses the js-yaml library, so anchors, aliases, multiline blocks, and typed values like numbers, booleans, and null are all handled correctly. Switch the direction toggle to turn JSON back into YAML, and choose 2 or 4 space indentation before you copy or download the result.
Converter Features
Why Use YAML to JSON Converter?
Two-Way Conversion
Go YAML to JSON or JSON to YAML with one toggle. The output updates live as you type.
Real YAML Support
Powered by js-yaml, so anchors, aliases, multiline blocks, and typed values all convert correctly.
Pick Your Indent
Choose 2 or 4 space indentation for clean, readable JSON or YAML output every time.
100% Private
Every conversion runs in your browser. Your config never leaves your device or hits a server.
Common Use Cases for YAML and JSON
Docker Compose
Convert docker-compose.yml files to JSON for programmatic access and validation.
Kubernetes
Turn K8s manifests into JSON for API calls, or JSON responses back into readable YAML.
CI/CD Workflows
Parse GitHub Actions and pipeline YAML into JSON for analysis, or generate YAML from JSON.
App Configuration
Move config between YAML and JSON when a tool or API expects one format over the other.
How It Works
Paste Your YAML or JSON
Drop your YAML into the input box, or load the sample to see how the converter works.
Set Direction and Indent
Choose YAML to JSON or JSON to YAML, then pick 2 or 4 space indentation for the output.
Copy or Download
The output updates instantly. Copy it to your clipboard or download a .json or .yaml file.
Tips for YAML to JSON Conversion
Indentation Matters
YAML uses spaces, not tabs, for structure. Keep indentation consistent so the parser reads the nesting you intend.
Round-Trip With Swap
Use the Swap sides button to feed the output back as input, so you can convert YAML to JSON and straight back to YAML.
Quote Ambiguous Values
If you need a value like a version number or a leading-zero ID to stay a string, wrap it in quotes so it is not read as a number.