Skip to content

YAML to JSON Converter

Convert YAML to JSON and JSON to YAML, with clear error locations.

Convert

Runs in your browser — nothing you enter is sent to a server.

How the YAML to JSON Converter works

Paste YAML to get JSON, or switch direction to turn JSON into YAML. YAML is parsed with the YAML 1.2 core schema, so numbers, booleans and null become JSON types. Several documents separated by --- become a JSON array.

When the YAML has a mistake — usually indentation — the error gives the line and column. Converting JSON to YAML quotes strings that would otherwise change type, such as "1.0" or "yes".

Formula

key: value → { "key": value } · - item → [ item ]

Indentation shows nesting; tabs aren't allowed for indentation in YAML.

Examples

A config file

port: 8080 / debug: false → { "port": 8080, "debug": false }

An error

a: [1, → Line 1, column 7: unexpected end of the stream within a flow collection.

Frequently asked questions

Why did my version number change?

In YAML, version: 1.10 is the number 1.1. Quote it — version: "1.10" — to keep it as text.

Are comments kept?

No. JSON has no comments, so YAML comments are dropped.

Is YAML a superset of JSON?

Yes — any valid JSON is also valid YAML 1.2.

JSON Formatter

Format, validate and minify JSON, with the exact line and column of any error.

Developer Tools

CSV to JSON Converter

Convert CSV to JSON and JSON to CSV, with quoted fields, delimiters and number detection.

Developer Tools

Text Difference Checker

Compare two texts and highlight what was added, removed or changed, line by line or word by word.

Text Tools