.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.

What opens 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.

Windows

  • VS Code
  • Notepad++
  • any editor

macOS

  • VS Code
  • any editor

Linux

  • VS Code
  • nano
  • any editor

Web

  • Online YAML validators

Open a .yaml file step by step

  1. Confirm the file really is a .yaml. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with VS Code or Notepad++.
  3. On Mac, use VS Code or any editor.
  4. On Linux, try VS Code or nano.
  5. Still stuck? Convert the .yaml to JSON, which opens more widely.

Why can't I open my .yaml file?

Almost always because no installed app understands YAML. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .yaml at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

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 has no fixed magic number, so there is no signature table on this page. Its bytes alone do not prove the format: identification relies on the extension, the structure of the content and the program that created it. The magic-numbers reference lists the formats that do carry one.

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. How sources are ranked and what is deliberately left out is set out in the methodology.