Certificate Fingerprint Generator
Generate SHA-256 and SHA-1 certificate fingerprints
Certificate (PEM Format)
About Fingerprints
Certificate fingerprints are cryptographic hashes used to uniquely identify certificates.
SHA-256 is recommended for modern applications.
Fingerprints
Paste a PEM certificate to generate fingerprints
The Certificate Fingerprint Generator computes SHA-256, SHA-1, and MD5 cryptographic hashes of X.509 certificates, producing the unique identifiers used for certificate pinning, out-of-band verification, and security auditing -- all calculated locally in your browser. Paste a PEM certificate and get fingerprints in colon-separated hex, raw hex, and base64 formats.
Understanding Certificate Fingerprints
A certificate fingerprint is not a field stored inside the certificate itself. It is a cryptographic hash computed over the entire DER-encoded certificate bytes. Think of it as a compact summary of the whole certificate: change a single bit anywhere in the certificate -- a different serial number, a different validity date, a different issuer -- and you get a completely different fingerprint. This property makes fingerprints invaluable for identifying and comparing certificates without needing to match every field individually.
The most common use of fingerprints is certificate pinning. When you build a mobile app or an API client that connects to a specific server, you can embed the expected certificate's SHA-256 fingerprint in your code. During the TLS handshake, your app computes the fingerprint of the server's certificate and compares it against the embedded value. If they do not match, the connection is rejected -- even if the certificate is technically valid and signed by a trusted CA. This protects against man-in-the-middle attacks where an attacker presents a fraudulent but CA-signed certificate.
Fingerprints are also essential for out-of-band verification. If someone sends you a certificate over email and you want to confirm it has not been tampered with, you can call them on the phone and read out the SHA-256 fingerprint. If the fingerprint matches what they computed on their end, you know you have the same certificate. This workflow is common when exchanging certificates for mutual TLS setups between organizations.
How to Generate a Certificate Fingerprint
- Paste your PEM-encoded certificate (starting with
-----BEGIN CERTIFICATE-----) - The tool computes fingerprints using SHA-256, SHA-1, and MD5 algorithms
- Copy the fingerprint in your preferred format (colon-separated hex, raw hex, or base64)
- Use the fingerprint for pinning configuration, documentation, or verification
Certificate Fingerprint Output Formats
The generator produces fingerprints in multiple representations for different use cases:
| Format | Example | Used By |
|---|---|---|
| Colon-separated hex | A1:B2:C3:D4:E5:F6:78:9A:... | OpenSSL, manual verification |
| Continuous hex | A1B2C3D4E5F6789A... | Programmatic comparison |
| Base64 | obLD1OX2mno=... | HPKP, Android, iOS pinning |
Algorithm Comparison
| Algorithm | Hash Length | Status |
|---|---|---|
| SHA-256 | 64 hex characters (256 bits) | Recommended standard |
| SHA-1 | 40 hex characters (160 bits) | Legacy, still seen in older tools |
| MD5 | 32 hex characters (128 bits) | Deprecated, not for security use |
Example Fingerprint Generation
For a certificate with CN=www.example.com:
SHA-256 Fingerprint:
Hex: B4:5A:E2:C3:7F:D1:92:4B:88:E6:A0:3C:55:71:F8:09:
2D:A4:C6:B7:E8:1F:3A:50:96:D2:44:7B:CC:8E:15:61
Base64: tFriw3/RkksI5qA8VXH4CS2kxrfoHzpQltJEe8yOFWE=
SHA-1 Fingerprint:
Hex: 9A:C2:D5:F7:11:3B:8E:44:6D:A9:01:C3:77:52:BB:DE:FF:08:91:23
MD5 Fingerprint:
Hex: 4D:2B:9A:C1:E5:F3:78:06:AA:11:DD:55:B2:C4:E6:F8
When to Use This Tool
- Certificate pinning implementation -- extract SHA-256 fingerprints for pinning certificates in mobile apps (Android
network-security-config.xmlor iOSInfo.plist) - Out-of-band verification -- compare fingerprints over a separate channel to confirm you have the correct certificate
- Security audits -- document certificate fingerprints in security policies and compliance reports
- Environment comparison -- verify that certificates deployed across staging, production, and CDN match by comparing fingerprints
- TLS inspection proxy setup -- configure trusted certificate fingerprints for proxy interception allowlists
- Change detection -- compare fingerprints before and after certificate operations to confirm whether a certificate was actually replaced
How Certificate Fingerprints Work
A certificate fingerprint is a cryptographic hash of the entire DER-encoded certificate. It is not a field inside the certificate -- it is computed over the raw certificate bytes. This means any change to the certificate, no matter how small, produces a completely different fingerprint.
The fingerprint uniquely identifies a specific certificate. Two certificates with different validity periods, serial numbers, or issuers will have different fingerprints even if they share the same public key and subject. This distinction matters: certificate pinning pins to a specific certificate, while public key pinning pins to the key regardless of which certificate contains it.
Pinning with SHA-256
Certificate pinning in production should always use SHA-256. The typical implementation flow:
- Extract the SHA-256 fingerprint of your server's leaf certificate
- Embed the fingerprint in your application code or configuration
- During TLS handshake, compute the fingerprint of the received certificate
- Compare against the stored fingerprint -- reject if they do not match
Computing Fingerprints with OpenSSL
You can verify this tool's output against OpenSSL:
# SHA-256 fingerprint
openssl x509 -in cert.pem -noout -fingerprint -sha256
# SHA-1 fingerprint
openssl x509 -in cert.pem -noout -fingerprint -sha1
# MD5 fingerprint
openssl x509 -in cert.pem -noout -fingerprint -md5
Fingerprint Best Practices
The most important decision in certificate pinning is choosing between pinning the certificate fingerprint and pinning the public key hash. Certificate fingerprints are simpler to implement -- you hash the whole certificate and compare -- but they break every time you renew because a renewed certificate has different validity dates, serial number, and signature, producing a different fingerprint. If you pin a certificate fingerprint without a rotation plan, your app will stop connecting the moment the certificate is renewed. Always pin at least two fingerprints: the current certificate and the next one you plan to deploy.
Public key pinning, by contrast, survives renewal as long as you reuse the same key pair. Many teams prefer this approach because it decouples pinning from the renewal cycle. However, if your security policy requires key rotation on every renewal, public key pinning provides no advantage and you are back to managing pin updates. Either way, you need a strategy for rolling pins before the current certificate or key is retired.
When documenting certificates for compliance or operations, include the SHA-256 fingerprint alongside the subject, issuer, and expiry date. Fingerprints give you an unambiguous identifier that is far more reliable than comparing subject names, which can be identical across multiple certificates. If you need to track a specific certificate across load balancers, CDN nodes, and monitoring systems, the fingerprint is the canonical reference.
Frequently Asked Questions
What is the difference between a certificate fingerprint and a public key hash? A certificate fingerprint hashes the entire certificate (including subject, issuer, validity, and the public key). A public key hash only covers the SubjectPublicKeyInfo portion. Certificate fingerprints change when you renew a certificate, even if you reuse the same key. Public key hashes remain stable across renewals with the same key pair, which is why some pinning implementations prefer them.
Which fingerprint algorithm should I use? Use SHA-256 for all new implementations. SHA-1 has known collision attacks and is only needed for compatibility with legacy systems that do not support SHA-256. MD5 is cryptographically broken and should never be used for security-sensitive verification.
How do I compute a fingerprint with OpenSSL for comparison?
Run openssl x509 -in cert.pem -noout -fingerprint -sha256 to produce the SHA-256 fingerprint in colon-separated hex format. Compare this output character by character with the result from this tool to verify consistency.
Can two different certificates have the same fingerprint? In practice, no. SHA-256 produces a 256-bit hash, and finding two different inputs that produce the same hash (a collision) is computationally infeasible with current technology. SHA-1 collisions have been demonstrated in research, which is one reason SHA-256 is the recommended standard.
Do certificate fingerprints change when the certificate format changes from DER to PEM? No. The fingerprint is always computed over the DER-encoded bytes, regardless of how the certificate is stored or transmitted. Converting between DER and PEM does not change the underlying DER data, so the fingerprint remains the same.
Related Tools
- X.509 Certificate Viewer - View full certificate details including subject, issuer, and extensions
- Public Key Extractor - Extract the public key for key-based pinning instead of certificate pinning
- Certificate Expiry Checker - Check validity dates and days remaining until expiration
- SAN Extractor - Extract all Subject Alternative Names from a certificate
- Convert DER to PEM - Convert DER binary certificates to PEM format before fingerprinting