AR (.ar)
.ar file signature | application/x-archive
AR is a Unix archive file format originally developed for early Unix systems and now standardized through POSIX and maintained by the relevant standards bodies. It is used to bundle object files, libraries, and related resources into a single archive, especially in static library and software packaging workflows. The format is generally safe to inspect, though archived contents should be trusted only when the source is known; it is largely a legacy format.
Magic Bytes
Offset 0
3D 3C 61 72 3E
Sources: Apache Tika
All Known Signatures
2 signature variants are documented for .ar files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 3D 3C 61 72 3E | 0 | Apache Tika |
| 21 3C 61 72 63 68 3E 0A | 0 | Apache Tika |
Extension
.ar
MIME Type
application/x-archive
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .ar files in Python
def is_ar(file_path: str) -> bool:
"""Check if file is a valid AR by magic bytes."""
signature = bytes([0x3D, 0x3C, 0x61, 0x72, 0x3E])
with open(file_path, "rb") as f:
return f.read(5) == signature
How to validate .ar files in Node.js
function isAR(buffer: Buffer): boolean {
const signature = Buffer.from([0x3D, 0x3C, 0x61, 0x72, 0x3E]);
return buffer.subarray(0, 5).equals(signature);
}
How to validate .ar files in Go
func IsAR(data []byte) bool {
signature := []byte{0x3D, 0x3C, 0x61, 0x72, 0x3E}
if len(data) < 5 {
return false
}
return bytes.Equal(data[:5], signature)
}
API Endpoint
/api/v1/ar
curl https://filesignature.org/api/v1/ar
See the full API documentation for all endpoints and parameters.
Related Formats
Frequently Asked Questions
What is a .ar file?
A .ar file is identified by the magic bytes 3D 3C 61 72 3E at byte offset 0. AR is a Unix archive file format originally developed for early Unix systems and now standardized through POSIX and maintained by the relevant standards bodies. It is used to bundle object files, libraries, and related resources into a single archive, especially in static library and software packaging workflows. The format is generally safe to inspect, though archived contents should be trusted only when the source is known; it is largely a legacy format.
What are the magic bytes for .ar files?
The magic bytes for AR files are 3D 3C 61 72 3E at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .ar file?
To validate a .ar file, read the first bytes of the file and compare them against the known magic bytes (3D 3C 61 72 3E) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .ar files?
The primary MIME type for .ar files is application/x-archive.
Is it safe to open .ar files?
AR (.ar) 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.