Skip to main contentSkip to main content
← Free SSL Tools

Does This Private Key Match Your Certificate?

Check that a certificate and its private key belong together by signing and verifying a short random challenge in your browser. Supports RSA, ECDSA and Ed25519 keys where the browser supports them.

Local cryptographic comparisonPEM and DER certificatesNo key upload by this tool

Private Key Safety First

For a production or high-value private key, prefer the OpenSSL commands below on the server where the key already lives. If you choose the browser method, it processes the key locally, does not transmit it to SSLNexus, and clears the form after each check. Browser extensions and compromised devices can still access secrets: use a trusted browser and device.

Match Certificate And Private Key

Paste public certificate data and a matching private key (unencrypted PKCS#8, RSA PKCS#1 or EC SEC1), or choose the corresponding files. Certificate bundles are supported.

Public certificate or full PEM chain.
Sensitive: use only on a device you trust. Unencrypted keys only; no passphrase is requested or stored.

OpenSSL Commands - Keep The Key On Your Server

Run both commands on the machine with your certificate and key. Compare the resulting SHA-256 hashes: identical hashes mean the public keys match.

From The Certificate

openssl x509 -in certificate.crt -pubkey -noout | openssl pkey -pubin -outform DER | openssl dgst -sha256

From The Private Key

openssl pkey -in server.key -pubout -outform DER | openssl dgst -sha256

Replace certificate.crt and server.key with your local file paths. If your private key is encrypted, OpenSSL may prompt for its passphrase locally. With a certificate bundle, the first PEM certificate is checked.

How The Matching Check Works

  1. Supply the certificate (PEM or DER) and private key (PEM or DER).
  2. The browser signs a new random challenge with the private key and verifies it using the certificate's public key.
  3. The result identifies whether the keys match, including when the certificate input contains a bundle.
  4. Use the OpenSSL alternative to keep sensitive production keys entirely on your server.

Need to read the certificate first? Try the SSL Certificate Decoder.

Frequently Asked Questions

Does the private key leave my browser?

No. This tool does not upload, submit or store the private key on SSLNexus servers. The key is processed locally using Web Crypto. Avoid entering production secrets into any web page on an untrusted browser or device. OpenSSL on your own server is the safer default for production keys.

Can I check encrypted private keys?

This browser tool does not accept encrypted private keys or ask for a passphrase. Use the OpenSSL commands locally instead, where OpenSSL can prompt securely for your passphrase.

Which private key types are supported?

Unencrypted PKCS#8, RSA PKCS#1 and EC SEC1 PEM or equivalent DER are supported for RSA and standard NIST EC curves. Ed25519 PKCS#8 is available in browsers that support Ed25519 Web Crypto. OpenSSH private key files are not supported.

Does a match prove my certificate is valid?

No. It confirms only that the certificate public key corresponds to the private key. It does not verify chain trust, validity dates, hostname, revocation or deployment.