JavaKeyStore file (.jks)
.jks file signature | application/x-java-keystore
Java KeyStore (JKS) is a keystore file format used in the Java platform and maintained through the Java Development Kit. It stores cryptographic keys, certificates, and trusted certificate entries for Java applications, application servers, and security tools. The format is legacy in many modern deployments, with newer keystore types often preferred; JKS files may also be protected by passwords, so access should be restricted to trusted users.
Magic Bytes
Offset 0
FE ED FE ED
Sources: Apache Tika, 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. Java KeyStore (JKS) is a keystore file format used in the Java platform and maintained through the Java Development Kit. It stores cryptographic keys, certificates, and trusted certificate entries for Java applications, application servers, and security tools. The format is legacy in many modern deployments, with newer keystore types often preferred; JKS files may also be protected by passwords, so access should be restricted to trusted users.
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.