Skip to content

MIME (.mime)

.mime file signature | message/rfc822

Safe

Magic Bytes

Offset 0
23 21 20 72 6E 65 77 73

Sources: Apache Tika

All Known Signatures

6 signature variants are documented for .mime files across multiple sources.

Hex Signature Offset Sources
23 21 20 72 6E 65 77 73 0 Apache Tika
4E 23 21 20 72 6E 65 77 73 0 Apache Tika
46 6F 72 77 61 72 64 20 74 6F 0 Apache Tika
50 69 70 65 20 74 6F 0 Apache Tika
58 2D 4D 61 69 6C 65 72 3A 0 Apache Tika
58 2D 4E 6F 74 65 73 2D 49 74 65 6D 3A 0 Apache Tika

Extension

.mime

MIME Type

message/rfc822

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .mime files in Python

Python
def is_mime(file_path: str) -> bool:
    """Check if file is a valid MIME by magic bytes."""
    signature = bytes([0x23, 0x21, 0x20, 0x72, 0x6E, 0x65, 0x77, 0x73])
    with open(file_path, "rb") as f:
        return f.read(8) == signature

How to validate .mime files in Node.js

Node.js
function isMIME(buffer: Buffer): boolean {
  const signature = Buffer.from([0x23, 0x21, 0x20, 0x72, 0x6E, 0x65, 0x77, 0x73]);
  return buffer.subarray(0, 8).equals(signature);
}

How to validate .mime files in Go

Go
func IsMIME(data []byte) bool {
    signature := []byte{0x23, 0x21, 0x20, 0x72, 0x6E, 0x65, 0x77, 0x73}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

GET /api/v1/mime
curl https://filesignature.org/api/v1/mime

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .mime file?

A .mime file is a MIME file.

What are the magic bytes for .mime files?

The magic bytes for MIME files are 23 21 20 72 6E 65 77 73 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .mime file?

To validate a .mime file, read the first bytes of the file and compare them against the known magic bytes (23 21 20 72 6E 65 77 73) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .mime files?

The primary MIME type for .mime files is message/rfc822.

Is it safe to open .mime files?

MIME (.mime) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.