Developer tool

YAML to JSON

Convert YAML to formatted JSON: paste a YAML document, see any syntax error with its message, and copy the JSON. Free, and parsed in your browser.

Your file never leaves your device.

Runs locally in your browser

Your text is not uploaded.

Simple steps

How it works

  1. 01

    Paste YAML into the editor.

  2. 02

    Convert it to formatted JSON and review any syntax message.

  3. 03

    Copy the JSON result.

How YAML values become JSON

The converter reads YAML 1.2, the current version, and writes the same data as JSON. Mappings become objects, sequences become arrays, and plain values become strings, numbers, true, false or null depending on how they are written. An empty value, as in empty:, becomes null.

Under YAML 1.2, yes, no, on and off are strings, not true and false, and the country code NO stays "NO". Older YAML 1.1 tools treat these words as booleans, so the same file can mean different things in different programs.

Values that change on the way

Numbers are parsed as numbers, so version: 1.10 becomes 1.1 and zip: 01234 becomes 1234, losing the trailing or leading zero. Quote such values (version: "1.10") to keep them as text. Dates such as 2026-10-29 stay strings.

Anchors and aliases (&name and *name) are expanded into copies. Merge keys (<<: *base) from YAML 1.1 are not merged; they stay as an ordinary key named <<.

Common errors

Indentation must use spaces; a tab at the start of a line is an error. The same key twice in one mapping is reported instead of silently keeping the last value, and the message gives the line and column. Comments are dropped, because JSON has no comments.

Good to know

Frequently asked questions

Which YAML version is supported?

The parser supports common YAML 1.2 documents and reports syntax errors from its parser.

Are comments included in JSON?

No. JSON contains the parsed data values, not YAML comments.

Can YAML contain multiple documents?

This tool converts a single YAML document at a time.

Is the parser downloaded on every tool page?

No. Its code is lazy-loaded only when the YAML to JSON page processes input.

Is YAML sent to a server?

No. Parsing and conversion happen locally in your browser.