How to use the certificate decoder
- Get the certificate. From a server:
openssl s_client -connect example.com:443 -showcerts </dev/nullprints the chain. From a file: open the.pemor.crtin a text editor. From a Kubernetes TLS Secret: decode it with the Kubernetes Secret decoder. - Paste it into the left pane. One certificate or the whole chain is fine; text around the PEM blocks is ignored.
- Read the details on the right, or switch Output to JSON for a script.
- Check the warnings above the result.
What it shows
- Subject and issuer, in the order of the certificate, with the attributes written as
C=,O=,CN=. A certificate whose issuer equals its subject is marked self-issued. - Validity: the Not before and Not after dates in UTC, and the status against your clock: valid with the days left, expired, or not valid yet.
- Public key: the type and size (RSA 2048 bits, EC P-256, Ed25519) and the signature algorithm.
- Alternative names: the DNS names, IP addresses (IPv6 in the short form), e-mail addresses and URIs that the certificate is valid for.
- Usages: key usage, extended key usage (
serverAuth,clientAuth), whether the certificate is a CA and its path length limit. - Identifiers and links: the subject and authority key identifiers, and the OCSP, CA issuers and CRL addresses.
- Fingerprints: SHA-256 and SHA-1 of the DER bytes, written like
openssl x509 -fingerprint, which you can compare with the value a server or a pinning rule lists.
Warnings worth knowing
The tool tells you in plain words when a certificate has expired or expires within 30 days, when it is not valid yet, when an RSA key is shorter than 2048 bits, when it is signed with SHA-1 or MD5, and when a server certificate has no Subject Alternative Name. For a chain it says if a certificate is not the issuer of the one before it.
Private keys
If the paste contains -----BEGIN PRIVATE KEY----- (or the RSA, EC and encrypted forms), the key is left unread and a warning appears. Do not share a private key with any website, and replace it if you did. The tool is for certificates only.
Related
To compare two fingerprints or hash a file, use the Hash Generator. A TLS certificate’s base64 is plain Base64, and the background on why encoding is not protection is in Base64 is not encryption. To read a login token instead of a certificate, use the JWT Decoder.
Frequently asked questions
Is it safe to paste a certificate here?
A certificate is public data, and it is decoded in your browser and never uploaded. The box is also where people paste the wrong thing, so the tool never reads a private key: it names the block in a warning and ignores it. If a key was pasted by mistake into any website, replace that key.
Which formats work?
PEM with the -----BEGIN CERTIFICATE----- lines (one certificate or a whole chain, also when it is surrounded by other text such as the output of openssl x509 -text), and the bare base64 of a DER certificate. A binary .der or .cer file has to be converted to base64 first; a CSR and a public key are skipped with a note.
How is the days left calculated?
From your device's clock, in UTC, against the Not after date of the certificate. Certificates are valid until the second written in Not after, so a certificate that expires today is shown as 'expires today'. A wrong clock on your computer gives a wrong answer.
Why does it warn that there is no Subject Alternative Name?
Browsers match the host name against the Subject Alternative Name list and ignore the common name (CN) for certificates that have no such list. A server certificate without one fails with a name mismatch in current browsers, even if the CN is right.
Does it check that the certificate is trusted or that the chain is valid?
No. It reads what is in the certificate. It does not verify signatures, check revocation or look for a root in a trust store. It only tells you when the chain you pasted looks out of order, because a certificate is not issued by the next one.
Last updated