ApplicationText-based
application/x-pem-file
PEM Certificate
Reference for application/x-pem-file, the MIME type for PEM-encoded certificates and keys used in TLS/SSL encryption.
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: .pem, .crt, .key
HTTP Content-Type Header
HTTP Header
Content-Type: application/x-pem-file; charset=utf-8Associated File Extensions
.pem.crt.key
Quick Facts
| MIME Type | application/x-pem-file |
| Category | Application |
| Type | Text-based (human-readable) |
| Extensions | .pem, .crt, .key |
Common Usage
PEM (Privacy Enhanced Mail) is the most common format for X.509 certificates, private keys, and certificate chains. It uses Base64 encoding between BEGIN/END headers.
Used for configuring TLS in web servers (nginx, Apache), mutual TLS, code signing, and SSH key management.
Code Examples
HTML
<!-- Link or embed with explicit type -->
<link rel="stylesheet" href="file.pem" type="application/x-pem-file">
<!-- Or for script/media elements -->
<script type="application/x-pem-file" src="file.pem"></script>Node.js
// Express.js
app.get('/file', (req, res) => {
res.type('application/x-pem-file');
res.send(data);
});
// Node.js http
res.writeHead(200, { 'Content-Type': 'application/x-pem-file' });nginx
# nginx.conf — add to types block or use default
types {
application/x-pem-file pem crt key;
}
# Or set for a specific location
location /api/ {
default_type application/x-pem-file;
}Related MIME Types
More Application MIME Types
Other application types in the Application family
Related Tools
Explore More MIME Types
Browse our complete reference of 185 MIME types with usage examples, HTTP headers, and code snippets.