.yaml

What is a .yaml file?

YAML Ain't Markup Language · Code and data · Clark Evans and others · 2001

YAML is a human-friendly data format built for configuration. It uses indentation instead of brackets, so it reads cleanly, which is why tools like Docker, Kubernetes and countless CI systems use YAML for their settings.

Category
Code and data
Type
Plain text
Also seen as
.yml
Is a .yaml file safe to open? Mostly safe, but some YAML libraries can construct arbitrary objects from tags. Use safe-load functions when parsing untrusted YAML.

What is a .yaml file used for?

YAML expresses the same data as JSON but with far less punctuation, relying on indentation to show structure. That makes config files easy to read and edit by hand.

It has become the default for DevOps and app configuration, appearing in Docker Compose, Kubernetes, GitHub Actions and many frameworks.

Its reliance on exact indentation is also its trap: one stray space can change the meaning, so a linter is your friend.

How to open a .yaml file

The .yaml format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .yaml file.

Windows

  • VS Code
  • Notepad++
  • any editor

macOS

  • VS Code
  • any editor

Linux

  • VS Code
  • nano
  • any editor

Web

  • Online YAML validators

How to convert a .yaml file

You can convert a .yaml file to JSON, XML using a conversion tool or the export menu of an app that opens it.

.yaml file signature (magic bytes)

Programs recognise a .yaml file by the bytes at the start of the file, not by its name. These are the signatures for YAML.

Hex signatureOffsetNote
(no fixed signature)0no fixed signature; indentation-based text

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .yaml file?

YAML is a human-friendly data format built for configuration. It uses indentation instead of brackets, so it reads cleanly, which is why tools like Docker, Kubernetes and countless CI systems use YAML for their settings.

Why is my YAML file failing to parse?

YAML is indentation-sensitive and forbids tabs for indentation. A single misplaced space or a tab character is the usual cause. Run it through a linter.

Related formats

Sources

Details on this page were checked against authoritative references: