WebTools

YAML to JSON

Takes files with several documents in them.

Convert YAML to JSON to read it from code, validate it against a schema, or simply see its structure without depending on indentation.

It accepts files with several documents separated by “---”: in that case the result is a list with one entry per document.

How to use it

  1. Paste the YAML or open the file.
  2. Choose the output indentation.
  3. Copy or download the JSON.

Frequently asked questions

Why does it say the YAML is invalid?
Almost always indentation: a tab among the spaces, or a level that does not line up. The error message gives the line where the reader lost its footing.
Is information lost in the conversion?
Yes, whatever JSON cannot represent: comments, anchors and references, and the distinction between string styles. All the values survive.
What about dates?
YAML recognises them as a type of their own; going to JSON they become text strings in ISO format.

Related tools