How the web works · Format

YAML

A human-friendly text format for configuration files that uses indentation instead of brackets, common in GitHub Actions, Docker Compose and Kubernetes.

Data formats · updated

How it works

YAML holds the same kinds of data as JSON (lists, key-value maps, strings, numbers) but is designed to be read and written by hand: a key, a colon and a value on each line, nesting by indentation, dashes for list items and # for comments. YAML 1.2 is a superset of JSON, so a JSON document is also valid YAML. It is the usual format for CI pipelines, Docker Compose files, Kubernetes manifests, OpenAPI specs and many app settings.

The friendliness has traps. Indentation must use spaces, and one wrong level silently changes the meaning. Unquoted values are guessed: in parsers that follow the older YAML 1.1 rules, no, off and the country code NO become false (the 'Norway problem'), and a version number such as 1.10 becomes 1.1. Quoting strings avoids most of this, and a linter or schema check in the editor catches the rest.

More in How the web works

Data formats

All 20 How the web works terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.