SSL Certificate & Private Key Matcher
Check whether a private key matches your SSL certificate. Paste both PEM blocks below and we compare the public key hash of each — a mismatch is the most common cause of a failed SSL installation.
Match your certificate and private key
Warning: Your private key is intended to remain on the server. While we try to make this process as secure as possible by using SSL to encrypt the key when it is sent to the server, for complete security, we recommend that you manually check the public key hash of the private key on your server using the OpenSSL commands below.
Verify it yourself on your server (recommended)
Run these OpenSSL commands where your files live. If the certificate and private key hashes are identical, they match — and your private key never leaves your server.
openssl x509 -in certificate.crt -noout -pubkey | openssl sha256openssl pkey -in private.key -pubout | openssl sha256openssl req -in request.csr -noout -pubkey | openssl sha256Why Check That Your Certificate and Key Match?
An SSL certificate only works with the private key it was created for. Match them first to avoid a failed install, a key values mismatch error and a broken HTTPS site.
Catch Install Errors Early
NGINX and Apache refuse to load a certificate that does not match its key, and NGINX reports “key values mismatch." A quick match check finds it before you reload NGINX, Apache or IIS.
Protect Your Private Key
Nothing you paste is stored or logged. For a production key, run the OpenSSL commands shown above on your own server. This tool shows only the key type, size, and SHA-256 hash.
Works With RSA and ECDSA
The tool compares the SHA-256 hash of the public key in your certificate with the one derived from your private key. It supports RSA and elliptic-curve keys, and shows the key type and size.
Explore More SSL & Certificate Tools
SSL Certificate Checker
Check the certificate on any public hostname for trust status, days left, TLS protocols, cipher suites and security headers.
Check SSLSSL Certificate Decoder
Paste a PEM or CRT certificate to read the subject, SAN list, validity dates, issuer and signature algorithm.
Decode SSLBIMI Record Checker
Verify your BIMI record, DMARC policy and VMC certificate for logo display in Gmail, Apple Mail and Yahoo.
Check BIMISSL Format Converter
Convert certificates between PEM, PKCS#7 (P7B), PKCS#12 (PFX) and DER formats, and get the OpenSSL commands to do the same locally.
Convert FormatsDKIM Record Checker
Look up a DKIM record by domain and selector to check the public key, key length and DNS errors that make DKIM fail.
Check DKIMCSR Decoder
Paste a CSR to read its common name, organization, key size and signature algorithm before you send it to a Certificate Authority.
Decode CSRFrequently Asked Questions
It is a free tool that checks whether a private key belongs to an SSL certificate. It compares the public key hash of each and tells you at once if the pair match before you install anything.
Paste your certificate and private key in PEM format, then select Match Certificate & Key. The result shows a match or mismatch banner, with the key type, size and public key SHA-256 hash for each.
It is the error OpenSSL and NGINX show when a certificate and private key are not a pair. The server will not load the certificate until you install the key that was created with the original CSR.
The usual causes are a key from a different CSR, a reissued certificate installed with the old key, or the wrong file pasted. A certificate only matches the key pair that created its CSR.
RSA and ECDSA keys in PEM format (-----BEGIN PRIVATE KEY----- or -----BEGIN RSA PRIVATE KEY-----), and certificates in PEM format. If you have a .pfx/.p12 or DER file, convert it to PEM first.
It takes the public key from the certificate and derives the public key from your private key, then compares their SHA-256 hashes. Identical hashes mean the private key belongs to the certificate.
A CSR holds the same public key as the certificate it produces, so a matching key gives the same hash. Check the tool for a CSR option, or use the OpenSSL commands shown on the page.
For a production key, run the OpenSSL commands shown on the page on your own server instead. A private key should stay on the server. Use the online tool for test or new keys.
Find the original key from the server where you created the CSR, or from a backup. If it is lost, generate a new CSR and private key, then reissue the certificate.
Install both files and run the SSL Certificate Checker to confirm the chain, expiry date and TLS protocols. Use the CSR & Certificate Decoder to read the names and key size before you order.
