YAML to JSON Converter
Convert YAML to JSON and JSON to YAML as you type. Anchors, merge keys and several documents work, and errors show the line.
Convert YAML to JSON and JSON to YAML as you type. Anchors, merge keys and several documents work, and errors show the line.
About this tool
YAML to JSON Converter works in both directions and updates as you type. Paste YAML, such as a Docker Compose file, a GitHub Actions workflow, a Kubernetes manifest or an OpenAPI file, and get JSON; or switch to JSON to YAML to get a clean YAML file. Anchors and aliases are resolved, and merge keys, the two arrows that take in a set of defaults, are applied, so the JSON shows the values a program will really use. A file with several documents, separated by three dashes, becomes a JSON array. Text in block style keeps its line breaks. Values follow YAML 1.2: true and false are booleans, while yes, no, on and off stay text, which avoids the well-known problem of the country code for Norway turning into false. Dates such as 2026-01-31 stay text as well, because JSON has no dates. When JSON is turned into YAML, text that could be misread is put in quotes: the version "1.10" stays text and does not become the number 1.1. You can also put all text in quotes. Keys can be sorted, and the indentation can be two or four spaces, or one line for JSON. If something is wrong, the message names the line and column and the reason. Tabs are a common one, because YAML does not allow them for indentation, and the message says so. For JSON the converter points to single quotes, comments or a comma before a closing bracket. Comments in YAML are left out, because JSON cannot hold them, and YAML that refers to itself cannot be written as JSON; both are reported. Files can be opened, dropped and downloaded, and Swap sends the result back as the new input, which is a quick way to tidy a file. The conversion runs in your browser, so configuration with passwords or internal addresses is not uploaded.

Or open or drop a file.
A file picks it for you.
Indent, sorted keys, quotes.
Or swap to convert back.
Live, without a button.
Resolved as programs do.
Become one JSON array.
Versions, yes and no stay text.
Configuration in the right form
See the values after anchors are applied.
ExampleDefaults merged into each service.
Find the line with a mistake.
ExampleA tab in the indentation is named.
Send a YAML example as JSON.
ExamplePaste it and copy the JSON.
Switch between the two forms.
Exampleopenapi.yaml to openapi.json.
Use YAML data in a program that reads JSON.
ExampleSeveral documents become an array.
Write YAML and watch the JSON.
ExampleSee how lists and nesting work.
Fewer surprises
Use spaces for indentation, always the same number.
Put versions, codes and times such as 12:30 in quotes.
Keep the YAML file if you need its comments.
Senior Software Engineer · Developer of Toolyconvert
Hemant developed YAML to JSON Converter and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.
Last updated 25 November 2026
Featured on
Toolyconvert is listed on these product directories and launch platforms.