BIB (.bib)
.bib file signature | application/x-bibtex-text-file
Magic Bytes
Offset 0
25 20 42 69 62 54 65 58 20 60
Sources: Apache Tika
All Known Signatures
5 signature variants are documented for .bib files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| 25 20 42 69 62 54 65 58 20 60 | 0 | Apache Tika |
| 25 25 25 20 20 | 73 | Apache Tika |
| 25 20 42 69 62 54 65 58 20 73 74 61 6E 64 61 72 64 20 62 69 62 6C 69 6F 67 72 61 70 68 79 20 | 0 | Apache Tika |
| 25 25 25 20 20 40 42 69 62 54 65 58 2D 73 74 79 6C 65 2D 66 69 6C 65 7B | 73 | Apache Tika |
| 25 | 0 | Apache Tika |
Extension
.bib
MIME Type
application/x-bibtex-text-file
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .bib files in Python
def is_bib(file_path: str) -> bool:
"""Check if file is a valid BIB by magic bytes."""
signature = bytes([0x25, 0x20, 0x42, 0x69, 0x62, 0x54, 0x65, 0x58, 0x20, 0x60])
with open(file_path, "rb") as f:
return f.read(10) == signature
How to validate .bib files in Node.js
function isBIB(buffer: Buffer): boolean {
const signature = Buffer.from([0x25, 0x20, 0x42, 0x69, 0x62, 0x54, 0x65, 0x58, 0x20, 0x60]);
return buffer.subarray(0, 10).equals(signature);
}
How to validate .bib files in Go
func IsBIB(data []byte) bool {
signature := []byte{0x25, 0x20, 0x42, 0x69, 0x62, 0x54, 0x65, 0x58, 0x20, 0x60}
if len(data) < 10 {
return false
}
return bytes.Equal(data[:10], signature)
}
API Endpoint
/api/v1/bib
curl https://filesignature.org/api/v1/bib
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .bib file?
A .bib file is a BIB file.
What are the magic bytes for .bib files?
The magic bytes for BIB files are 25 20 42 69 62 54 65 58 20 60 at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .bib file?
To validate a .bib file, read the first bytes of the file and compare them against the known magic bytes (25 20 42 69 62 54 65 58 20 60) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .bib files?
The primary MIME type for .bib files is application/x-bibtex-text-file.
Is it safe to open .bib files?
BIB (.bib) 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.