Skip to content
All tools›Converters›YAML to JSON Converter

YAML to JSON Converter

Convert a YAML document into JSON with your preferred indentation and brace style.

Loading tool...

YAML explained

YAML ("YAML Ain't Markup Language") is a human-friendly data serialization format widely used for configuration files. Its data model is a superset of JSON: mappings, sequences and scalars. Structure is expressed by indentation with spaces.

YAML basics

Concept YAML JSON equivalent
Mapping name: Alice {"name": "Alice"}
Sequence - json / - yaml ["json", "yaml"]
Flow style tags: [a, b] {"tags": ["a", "b"]}
Multi-line literal text: | Line breaks kept
Multi-line folded text: > Line breaks become spaces
Anchors & aliases &defaults / *defaults Reuse values
Multiple documents --- separator Array of objects

Common pitfalls

  • Tabs are forbidden for indentation.
  • A value containing : or starting with special characters must be quoted.
  • In YAML 1.1 yes/no were booleans; in YAML 1.2 they are strings.
  • Duplicate keys in a mapping are an error.
---