About this tool
Found a key file and not sure what it is? This inspector identifies private keys in all the common formats and tells you the algorithm, key size or curve, whether it’s protected by a passphrase, and its fingerprints. For unencrypted keys it derives the matching public key, in PEM and OpenSSH form, so you can check which certificate or server a key belongs to.
Supported formats
- PKCS#8
BEGIN PRIVATE KEY: RSA, ECDSA (P-256, P-384, P-521), Ed25519 and X25519. - PKCS#1
BEGIN RSA PRIVATE KEYand SEC1BEGIN EC PRIVATE KEY: the older OpenSSL formats. - Encrypted PKCS#8
BEGIN ENCRYPTED PRIVATE KEY: shows the cipher, key-derivation function and iteration count, without needing the passphrase. - OpenSSH
BEGIN OPENSSH PRIVATE KEY: key type, size, passphrase protection, comment and fingerprint.
Matching a key to a certificate
A certificate and private key belong together when their public keys match. Compare the Public key SHA-256 shown here with the public key in the Certificate Decoder, or locally with:
openssl pkey -in key.pem -pubout | openssl sha256
openssl x509 -in cert.pem -pubkey -noout | openssl sha256
If a key may have leaked
Treat it as compromised: generate a new key, replace it everywhere it’s used, and revoke any certificates issued for the old one. For SSH, remove the old public key from every authorized_keys file and Git hosting account.
FAQ
How do I find out what type of private key I have?
Paste or open it above. The inspector shows the format, algorithm, key size or curve, and whether it is encrypted.
How do I get the public key from a private key?
Paste an unencrypted private key; the matching public key appears in PEM and OpenSSH formats. Locally: openssl pkey -in key.pem -pubout.
Can it read encrypted keys?
It shows how an encrypted key is protected (cipher, KDF and iterations) but does not ask for the passphrase or decrypt the key.
Is my key uploaded?
No. Everything runs in your browser. Even so, only paste keys you can afford to replace.