FILE FORMAT GUIDE

YAML File: What It Is & How to Open It

YAML stores mappings, sequences and scalar values in readable text. It is often used for configuration, but it is a serialization language rather than a configuration application. A .yml filename is another extension for YAML. Inspect the syntax and the consuming application's expected data model before changing values.

Quick facts

Extension
.yaml, .yml
Format
YAML
Category
data
MIME type
application/yaml
Standard / developer
YAML Language Development Team
Open with
Visual Studio Code or another text editor

What is YAML?

Block-style YAML uses indentation to express structure; flow styles use explicit punctuation. Tags and scalar resolution affect the resulting types. A YAML stream may contain multiple documents. Matching a parser's accepted syntax does not prove that the application accepts the same schema or YAML language version.

How to open YAML

Visual Studio Code or another text editorWindows / macOS / Linux

Open the YAML file as plain text. Use syntax highlighting and validation for readability, but confirm the target application's required schema before saving changes.

Visual Studio Code language support

Common uses and compatibility

  • Store configuration and serialized application data
  • Exchange single-document or multi-document YAML streams

Things to check

  • A single-document consumer must not silently ignore extra stream documents.
  • General-purpose loading can construct objects; safe_load is the documented restricted loading interface in PyYAML.

Advanced inspection

These developer and command-line workflows inspect structure or metadata. They are not the default way most people open the file.

PyYAMLPython library

For programmatic reading, pass a text or file stream to yaml.safe_load. Use safe_load_all if multiple documents are expected. Do not use the unrestricted loader for untrusted input. This workflow reads data into Python objects; it does not launch the configured application.

Technical details

Signature
No registered magic number
Encoding
UTF-8 / UTF-16 / UTF-32 input (YAML 1.2); UTF-8 recommended for output
Container
Not reviewed
Compression
Not reviewed

YAML 1.2.2

Related formats

  • JavaScript Object Notation

    Shares structured mappings, sequences and scalar values but has a different presentation and parser ecosystem.

  • TOML

    Another configuration syntax, using explicit table headers instead of indentation-based nesting.

  • Extensible Markup Language

    An alternative serialization model based on markup elements and attributes.

Sources & review

Sources reviewed 2026-09-18.