YAML (YAML Ain't Markup Language)
YAML is a human-friendly data serialization language that uses indentation to represent structure. It is the preferred format for configuration files in DevOps tools (Docker Compose, Kubernetes, Ansible, GitHub Actions) and is a superset of JSON.
MIME Type
application/x-yaml
Type
Text
Compression
Lossless
Advantages
- + Highly readable โ minimal syntax noise
- + Supports comments for inline documentation
- + Native in Docker, Kubernetes, Ansible, and CI/CD systems
- + Superset of JSON โ any JSON is valid YAML
Disadvantages
- โ Indentation-sensitive โ whitespace errors cause silent failures
- โ Implicit type coercion can cause bugs ('yes' becomes boolean true)
- โ More complex specification than JSON with anchors, tags, and directives
When to Use .YAML
Use YAML for configuration files, CI/CD pipelines, container orchestration, and any human-edited structured data.
Technical Details
YAML uses indentation (spaces, not tabs) for nesting, colons for key-value pairs, and hyphens for list items. It supports anchors (&) and aliases (*) for data reuse, multi-line strings, and comments.
History
Clark Evans, Ingy dot Net, and Oren Ben-Kiki created YAML in 2001. The recursive name stands for 'YAML Ain't Markup Language.' YAML 1.2 (2009) aligned the specification as a JSON superset.
Convert from .YAML
Convert to .YAML
Related Formats
Related Terms
Learn More
JSON vs YAML vs TOML: Choosing a Configuration Format
Configuration files are the backbone of modern applications. JSON, YAML, and TOML each offer different trade-offs between readability, complexity, and โฆ
How to Format and Validate JSON Data
Malformed JSON causes silent failures in APIs and configuration files. Learn how to format, validate, and debug JSON documents to โฆ
Base64 Encoding: How It Works and When to Use It
Base64 converts binary data into ASCII text, making it safe for transmission through text-based systems. Learn when Base64 is the โฆ
Best Practices for Working with Unix Timestamps
Unix timestamps provide a language-agnostic way to represent points in time, but they come with pitfalls around time zones, precision, โฆ
Troubleshooting JWT Token Issues
JSON Web Tokens are widely used for authentication but can be frustrating to debug. This guide covers common JWT problems โฆ
Hash Functions Compared: MD5, SHA-1, SHA-256, and Beyond
Hash functions are used for file integrity, password storage, and digital signatures. This comparison covers the most common algorithms, their โฆ