.yamlapplication/yamlStructured Data & Configuration

YAML Ain't Markup Language (YAML)

Kubernetes manifests, GitHub Actions CI workflows, OpenAPI 3.x specs, Ansible playbooks, and human-edited configs.

Quick Answer

YAML 1.2 is an indentation-driven superset of JSON supporting inline comments, anchors/aliases, multi-line strings, and multi-document streams separated by ---.

YAML · Format specs
PropertyYAML
File extension.yaml
MIME typeapplication/yaml
Structure typeHierarchical
EncodingUTF-8 Text
Nesting supportYes
LLM token efficiencyMedium
Schema / typedNo
Best forKubernetes manifests, GitHub Actions CI workflows, OpenAPI 3.x specs, Ansible playbooks, and human-edited configs.

Strengths

  • Clean, readable syntax with # comments and unquoted strings ideal for DevOps and API specs
  • Supports multi-document streams (---) and reusable anchors (&base / *base)
  • Fewer punctuation tokens than JSON, though TOON beats YAML on uniform array prompts

Trade-offs

  • Whitespace-significant indentation easily breaks during copy-paste across Slack or chat
  • YAML 1.1 implicit typing quirks (NO -> false, on -> true) cause subtle bugs unless using YAML 1.2
  • Complex parsers and alias bombs make untrusted YAML slower and trickier than JSON

Convert & inspect YAML locally

Related engineering guides

Related Comparisons

YAML frequently asked questions

Does DataTo follow YAML 1.2 or YAML 1.1?

DataTo uses the yaml package compliant with YAML 1.2, preventing legacy YAML 1.1 boolean surprises like country code NO turning into false.

Can I convert multi-document YAML (---) to JSON?

Yes. With Support multi-document YAML enabled, multiple --- documents parse cleanly into a JSON array.

Should I send YAML or TOON to an LLM?

YAML is already leaner than JSON, while TOON saves an extra 35%–45% tokens on uniform lists of objects. Convert directly via DataTo YAML to TOON.

Authoritative References

Explore other formats

All 14 formats →