YAML to JSON Converter: Convert YAML to JSON and Back
Paste YAML and get clean, formatted JSON in one click, or switch direction and convert JSON to YAML. Syntax errors are flagged so you can fix them fast. Free, no signup.
Convert YAML to JSON Without the Guesswork
Kubernetes manifests, GitHub Actions workflows, Docker Compose files and OpenAPI specs are all written in YAML, but plenty of tools, APIs and test runners only accept JSON. Paste your YAML here and the YAML to JSON converter gives you valid, indented JSON you can drop into a request body, a config loader or a test fixture.
Read moreConvert JSON to YAML in the Same Tool
Click Swap and the page becomes an online JSON to YAML converter. That’s handy when an API hands you JSON and you need it as a readable config file, Helm values or a CI pipeline step. The YAML output is cleanly indented, so it’s ready to commit.
Catch YAML Mistakes Before They Ship
A tab instead of spaces, a missing colon or one line indented a space too far is all it takes to break a YAML file. The converter flags invalid YAML, so you fix it here instead of finding out when kubectl or your CI runner throws an error.
What Changes During YAML to JSON Conversion
JSON is stricter than YAML, so a few things shift. Comments are dropped, because JSON has no comment syntax. Anchors and aliases (&default and *default) are expanded into full copies. Multi-line strings become single strings with \n line breaks. Your keys and values stay the same.
Watch Out for Sneaky YAML Values
Unquoted values can change type without warning. A version like 1.10 becomes the number 1.1, and a value with a leading zero like 0755 can come through as a number too. Under older YAML 1.1 rules, yes, no, on and off turn into true or false, which is how Norway’s country code NO famously became false. Quote anything that must stay a string.
An Online YAML to JSON Converter for Everyday Work
Use it to inspect a docker-compose.yml as JSON, feed YAML config into tools like jq that only read JSON, or turn an OpenAPI YAML spec into JSON for code generators. It runs in your browser, so you can convert files from any device without installing anything.
How to Convert YAML to JSON
Paste your YAML
Pick the direction
Click Convert
Copy or download
YAML to JSON FAQs
Common questions about converting between YAML and JSON.
How do I convert YAML to JSON?
How do I convert JSON to YAML?
Is YAML a superset of JSON?
Why do I get an error when converting YAML?
Does the converter keep YAML comments?
YAML or JSON: which should I use?
Is this YAML to JSON converter online free?
Is my data safe?
Converted? Check the Result.
Explore the output in JSON Viewer, or tidy it up with our JSON Formatter.
JSON ViewerRaheel Jakhura
CEO / Co-Founder
Our goal is to provide online free tools so you don't have to install any software for basic usages. We are trying to add more tools and make these tools free forever.