YAML (a recursive acronym for YAML Ain't Markup Language) is a human-readable data serialisation format designed to represent structured data in a way that is easy for both humans to write and machines to parse. Originally proposed in 2001, it has become one of the most widely adopted formats for configuration files across the software development ecosystem, particularly in contexts where clarity and maintainability matter as much as machine readability.
Unlike formats such as JSON or XML, YAML uses indentation and minimal punctuation to define structure, which gives it a clean, document-like appearance. A YAML file expresses data as key-value pairs, lists, and nested structures using whitespace rather than brackets or tags. This makes it approachable for developers and non-developers alike, though it also means that indentation errors can cause parsing failures - a common pitfall for newcomers.
YAML is particularly prevalent in CI/CD pipelines, where tools such as GitHub Actions, GitLab CI, and CircleCI use YAML files to define automated workflows. Each step in a pipeline - from running tests to deploying an application - is described declaratively in a .yml or .yaml file that lives alongside the project's source code. This approach, sometimes called configuration as code, makes pipeline definitions version-controlled and auditable.
Beyond CI/CD, YAML is the native configuration language for Docker Compose, where a single docker-compose.yml file can describe an entire multi-container application including its services, networks, and volumes. It is also central to infrastructure-as-code tools such as Kubernetes, Ansible, and Helm, all of which rely on YAML to express desired system states and resource definitions.
YAML is a superset of JSON, meaning that any valid JSON document is also valid YAML. In practice, however, YAML files look quite different from JSON because authors take advantage of YAML's more expressive, whitespace-driven syntax. The format supports features such as comments (using the # character), multi-line strings, and anchors that allow values to be reused across a file - capabilities that JSON does not offer natively.
When working with YAML in a web development or DevOps context, it is worth understanding that the format itself is language-agnostic. Most programming languages have libraries capable of reading and writing YAML, which contributes to its broad adoption. Validation tools and linters such as yamllint can help catch structural errors before a file is deployed, reducing the risk of configuration-related failures in production environments.