YAML file format: what it is and how to use it
YAML is the human-friendly data language: indentation-structured config files with comments, powering DevOps, Kubernetes and a generation of tooling. Learn when to use it and what to choose instead.
-
No uploadsFiles stay on your device
-
Batch processingHandle multiple files at once
-
100% privateNo sign-up, no tracking
What is a YAML file?
A .yaml file is data in YAML, 'YAML Ain't Markup Language': indentation-structured maps, lists and scalars with comments, anchors and multi-line strings, designed to be written and read by humans. It became the config language of DevOps: Kubernetes, Docker Compose, GitHub Actions and Ansible all speak it, despite a spec famous for edge cases like yes meaning boolean.
When should you use YAML?
- Human-maintained configs: DevOps manifests, CI pipelines, app settings.
- Structured docs with comments: annotated data JSON cannot express.
- Ecosystem convention: when the tools you use speak YAML natively.
When is another format a better fit?
For machine interchange JSON is stricter and universal; for simple configs TOML avoids YAML's whitespace traps; for Apple land PLIST. YAML's traps are real, from yes/no/on/off coercions to indentation sensitivity.
The short version: YAML is the config language of the DevOps era: human-friendly by design, quirky underneath.
How to open a YAML file
On Windows
Double-click the file, or open it with Any text editor.
On macOS
VS Code opens YAML files on macOS.
In your browser
Open YAML files right in a browser tab or with the dexrr viewer. No install, no upload.
Also opens in
-
Any text editor
-
VS Code
-
yq
View or convert YAML files
A quick preview or a new format. No install, no upload.
YAML technical details
- Full name
- YAML
- Extensions
- .yaml .yml
- MIME type
-
application/yaml, text/yaml, application/x-yaml - Compression
- None (uncompressed)
- Developer
- Clark Evans, Ingy döt Net, Oren Ben-Kiki
- Specification
- yaml.org
YAML questions, answered
How do I open a .yaml file?
Any text editor or IDE, and indentation-aware editors make it much friendlier. dexrr displays and converts yaml files directly in your browser.
Can I convert YAML files online?
Yes, dexrr converts yaml locally in your browser: YAML to JSON for pipelines or YAML to TOML for configs.
Is YAML better than JSON?
For humans writing configs, yes, comments and readability. For machines exchanging data, JSON's strictness wins. YAML's yes/no coercion traps are legendary.
Why does `yes` in my YAML become `true`?
YAML 1.1 treated yes, no, on, off as booleans, the famous Norway problem (NO → false). Quote strings explicitly to be safe.
Is the YAML format outdated?
No, it is entrenched in DevOps tooling and remains the default config language of the cloud-native world.