JavaKeyStore file (.jks)
.jks file signature | application/x-java-keystore
JavaKeyStore file
Magic Bytes
Offset 0
FE ED FE ED
Sources: Apache Tika, Gary Kessler
All Known Signatures
3 signature variants are documented for .jks files across multiple sources.
| Hex Signature | Offset | Sources |
|---|---|---|
| FE ED FE ED | 0 | Apache Tika, Gary Kessler |
| FE ED FA CE | 0 | Gary Kessler |
| FE ED FA CF | 0 | Gary Kessler |
Extension
.jks
MIME Type
application/x-java-keystore
Byte Offset
0
Risk Level
Safe
Validation Code
How to validate .jks files in Python
def is_jks(file_path: str) -> bool:
"""Check if file is a valid JKS by magic bytes."""
signature = bytes([0xFE, 0xED, 0xFE, 0xED])
with open(file_path, "rb") as f:
return f.read(4) == signature
How to validate .jks files in Node.js
function isJKS(buffer: Buffer): boolean {
const signature = Buffer.from([0xFE, 0xED, 0xFE, 0xED]);
return buffer.subarray(0, 4).equals(signature);
}
How to validate .jks files in Go
func IsJKS(data []byte) bool {
signature := []byte{0xFE, 0xED, 0xFE, 0xED}
if len(data) < 4 {
return false
}
return bytes.Equal(data[:4], signature)
}
API Endpoint
/api/v1/jks
curl https://filesignature.org/api/v1/jks
See the full API documentation for all endpoints and parameters.
Frequently Asked Questions
What is a .jks file?
A .jks file is a JavaKeyStore file file. JavaKeyStore file
What are the magic bytes for .jks files?
The magic bytes for JavaKeyStore file files are FE ED FE ED at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.
How do I validate a .jks file?
To validate a .jks file, read the first bytes of the file and compare them against the known magic bytes (FE ED FE ED) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.
What is the MIME type for .jks files?
The primary MIME type for .jks files is application/x-java-keystore.
Is it safe to open .jks files?
JavaKeyStore file (.jks) 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.