What is YAML?

YAML ("YAML Ain’t Markup Language") is a human-readable data serialization format that uses indentation instead of brackets. It is popular for configuration files (Docker Compose, Kubernetes, CI pipelines) because it is concise and easy to read.

YAML is a superset of JSON, so any JSON is valid YAML. Its reliance on indentation means whitespace errors are a common pitfall.

Key points

  • Uses indentation instead of brackets for structure.
  • Any valid JSON is also valid YAML.
  • Supports comments with #, unlike JSON.
  • Whitespace-sensitive — indentation mistakes are a common bug.

Example

name: Ada
active: true
roles:
  - admin

Common uses

  • CI/CD pipeline configuration (GitHub Actions, GitLab CI)
  • Kubernetes and Docker Compose manifests
  • Application configuration files
  • Readable data serialization

Work with YAML directly in your browser.

Open the YAML ↔ JSON

More terms