Skip to content
YAML ↔ JSONDeveloper tools

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.

Did this tool work for you?

About this tool

About YAML to JSON Converter

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.

YAML to JSON Converter tool

When to convert YAML and JSON

Configuration in the right form

Docker and Kubernetes

See the values after anchors are applied.

ExampleDefaults merged into each service.

CI workflows

Find the line with a mistake.

ExampleA tab in the indentation is named.

APIs

Send a YAML example as JSON.

ExamplePaste it and copy the JSON.

OpenAPI files

Switch between the two forms.

Exampleopenapi.yaml to openapi.json.

Loading data

Use YAML data in a program that reads JSON.

ExampleSeveral documents become an array.

Learning YAML

Write YAML and watch the JSON.

ExampleSee how lists and nesting work.

YAML tips

Fewer surprises

No tabs

Use spaces for indentation, always the same number.

Quote what is text

Put versions, codes and times such as 12:30 in quotes.

Comments are lost

Keep the YAML file if you need its comments.

Work with the JSON

Format and search it.

Open JSON Formatter

Describe the data

Make a JSON Schema from it.

Open JSON Schema Generator

Pick values

Test a path on the JSON.

Open JSONPath Tester
Built & tested by

HemantInsights

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

Answers and guidanceFrequently Asked Questions
How do I convert YAML to JSON?
Paste the YAML. The JSON appears as you type; copy it or download it.
Are anchors and merge keys supported?
Yes. They are resolved in the JSON.
Why do yes and no stay text?
That is how YAML 1.2 works. Only true and false are booleans. Some older programs still read yes as true.
What happens to comments?
They are left out, because JSON has no comments.
What if my file has several documents?
They are put in a JSON array in the same order.
Why is there an error about tabs?
YAML does not allow tabs for indentation. Replace them with spaces.
Is my file uploaded?
No. It is converted in your browser.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.