Skip to content
.ymldata

YAML

YAML Ain't Markup Language

MIME type: application/x-yaml

YAML is a human-friendly data serialization language used extensively for configuration files, CI/CD pipelines, and infrastructure-as-code. It uses indentation instead of brackets, making it cleaner to read than JSON or XML.

Advantages

  • +Very human-readable
  • +Supports comments (JSON doesn't)
  • +Less verbose than JSON or XML
  • +Widely used in DevOps (Docker, Kubernetes, GitHub Actions)

Limitations

  • -Indentation-sensitive (tabs vs spaces cause errors)
  • -Implicit typing can cause surprises ('yes' becomes boolean true)
  • -Not as fast to parse as JSON
  • -Complex features (anchors, aliases) are confusing

Common Use Cases

Docker Compose filesKubernetes manifestsGitHub Actions workflowsCI/CD pipeline configsAnsible playbooks

Technical Details

YAML uses indentation to denote structure. It supports scalars (strings, numbers, booleans, null), sequences (arrays), and mappings (objects). YAML 1.2 (current) is a superset of JSON — all valid JSON is valid YAML.

Frequently Asked Questions

What is YAML?

YAML is a human-readable data format used for configuration files. It's popular in DevOps (Docker, Kubernetes, CI/CD) because it's cleaner than JSON or XML.

YAML vs JSON — which should I use?

YAML is better for config files (supports comments, less verbose). JSON is better for APIs and data interchange (faster parsing, no indentation issues).

Related Tools

Related Formats

Compare YAML with...