TextText-based

text/yaml

YAML

Reference for text/yaml, the standard text MIME type for YAML data serialization and configuration files.

MIME Type Detector

Drop a file to detect its MIME type — no upload, runs in your browser

📄

Drop any file here or click to choose

Expected extensions: .yaml, .yml

HTTP Content-Type Header

HTTP Header
Content-Type: text/yaml; charset=utf-8

Associated File Extensions

.yaml.yml

Quick Facts

MIME Typetext/yaml
CategoryText
TypeText-based (human-readable)
Extensions.yaml, .yml

Common Usage

YAML (YAML Ain't Markup Language) is a human-friendly data serialization format. It is the standard for Kubernetes manifests, Docker Compose, GitHub Actions, GitLab CI, Ansible playbooks, and countless configuration files across the DevOps ecosystem.

Code Examples

HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.yaml" type="text/yaml">

<!-- Or for script/media elements -->
<script type="text/yaml" src="file.yaml"></script>
Node.js
// Express.js
app.get('/file', (req, res) => {
  res.type('text/yaml');
  res.send(data);
});

// Node.js http
res.writeHead(200, { 'Content-Type': 'text/yaml' });
nginx
# nginx.conf — add to types block or use default
types {
    text/yaml  yaml yml;
}

# Or set for a specific location
location /api/ {
    default_type text/yaml;
}

Related MIME Types

More Text MIME Types

Other text types in the Text family

Related Tools

Explore More MIME Types

Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.