{ }jsonkit
Format
Validate
Convert
Query
Generate
yml→

YAML to JSON converter

Turn a YAML file into formatted JSON, with anchors resolved.
162 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12 13
✓ complete162 B → 219 B0.0 ms

About YAML to JSON

This YAML to JSON converter turns a YAML file into formatted JSON. Paste a Kubernetes manifest, a GitHub Actions workflow or a Docker Compose file and get JSON that any program can parse.

Anchors and aliases are resolved, so the JSON contains the full values. Comments are dropped because JSON has no comment syntax. Use the swap control to convert JSON to YAML instead.

Runs in your browser. Nothing is uploaded.

How it works

YAML to JSON

Mappings become JSON objects, sequences become arrays and scalars become strings, numbers, booleans or null. The output is pretty-printed with 2-space indentation, and the tree view shows its structure.

Types follow YAML 1.2

Bare true, false, null and numbers keep their type, and everything else becomes a string. Quote a value in your YAML, like "2026-08-01" or "yes", to make sure it stays a string.

Anchors, aliases and comments

An alias such as *defaults is replaced by a copy of the anchored value. # comments are not data, so they do not appear in the JSON.

Errors point to the line

If the YAML is invalid, for example because of a tab used for indentation or a key at the wrong level, the parser message tells you which line to fix.

Frequently asked questions

Does YAML to JSON keep my comments?

No. JSON has no comments, so YAML comments are dropped. All data values are kept.

Why did yes or on stay a string?

The converter follows YAML 1.2, where only true and false are booleans. Older YAML 1.1 parsers also treat yes, no, on and off as booleans.

Can I convert a file with several YAML documents?

Not in one go. Files that use --- to separate several documents need to be split first. Convert one document at a time.

How do I convert JSON back to YAML?

Click the swap control. The same page converts JSON to YAML, and your input stays in place.

Is my YAML uploaded?

No. The conversion runs in your browser, so secrets in config files stay on your machine.

Sources & last verified

We checked this tool's behavior and the claims on this page against the specifications below on . The tool runs in your browser, so the output you see is exactly what the engine produced.

Found a wrong result or an outdated claim? Report an error and we will check it again.