Pack Camo

X.509 Certificate Decoder

Read the subject, issuer, validity, SANs and fingerprints of any PEM or DER certificate.

Everything runs locally with zero file uploads.

Certificate

2 certificates

…

See exactly what a certificate says

This certificate decoder reads X.509 certificates — the SSL/TLS certificates on every HTTPS site, and the ones used for client authentication, code signing and S/MIME — and lays out their contents: subject and issuer, validity dates and days to expiry, subject alternative names, public key type and size, every extension, and SHA-1 and SHA-256 fingerprints. Paste one or more PEM blocks, bare Base64, or drop a .crt, .cer, .der, .pem or .p7b file. A full chain is decoded certificate by certificate and each signature is checked against the next. The parsing happens in your browser; nothing is uploaded.

How to decode a certificate

  1. 1Paste the certificate, including the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines, or drop the file onto the input.
  2. 2Read the summary: who it was issued to, who issued it, and whether it is valid today.
  3. 3Check the Subject Alternative Names: browsers match the hostname against these, not against the Common Name.
  4. 4Copy a fingerprint to compare with another copy, or export everything as JSON.

What is in an X.509 certificate?

A certificate binds a public key to a name, and is signed by an issuer who vouches for that binding. The subject is who the certificate is for and the issuer is who signed it, both written as distinguished names such as CN=example.com, O=Example Inc., C=US. The validity period gives the first and last moments the certificate may be trusted, and the serial number identifies it uniquely among everything the issuer has signed — it is what appears on revocation lists.

Everything else lives in extensions. Since version 3 of the format, which every certificate in use today follows, these carry most of the meaning: which names it covers, what the key may be used for, whether it may sign other certificates, and where to check if it has been revoked.

The extensions that matter

Subject Alternative Name (SAN)
The DNS names, IP addresses, emails and URIs the certificate is valid for. Browsers ignore the Common Name and check only this list; a wildcard such as <code>*.example.com</code> covers one level of subdomain.
Key Usage and Extended Key Usage
What the key may do: sign, encrypt keys, sign certificates; and for which purpose, such as TLS server authentication or code signing.
Basic Constraints
Whether this is a certificate authority (<code>CA:TRUE</code>) that may sign other certificates, and how many intermediate levels may follow it (path length).
Authority Information Access and CRL Distribution Points
Where to download the issuer's certificate, where its OCSP responder is, and where its certificate revocation list lives.
Certificate Policies
Which validation level the CA applied: domain validated (DV), organization validated (OV) or extended validation (EV).
Signed Certificate Timestamps
Proof that the certificate was logged in public Certificate Transparency logs, which browsers require for publicly trusted TLS certificates.

PEM, DER, CRT and CER

DER is the binary encoding of a certificate (ASN.1 Distinguished Encoding Rules). PEM is the same bytes in Base64 between -----BEGIN CERTIFICATE----- lines, so it can be pasted into text files and emails; several PEM blocks in one file make a chain. The extensions .crt and .cer say nothing about which encoding is inside — either is common — and this decoder accepts both. A .p7b file is a PKCS#7 bundle holding several certificates, and is opened too.

To convert on the command line, openssl x509 -in cert.der -inform der -out cert.pem turns DER into PEM, and openssl x509 -in cert.pem -noout -text prints much the same information as this page.

Chains, self-signed certificates and fingerprints

A server should send its own certificate followed by the intermediates that lead to a trusted root. When you paste a chain here, each certificate's signature is verified against the public key of the one after it, so you can see at a glance whether the order is right and whether a link is missing. A certificate whose subject and issuer are the same, and whose signature verifies with its own key, is self-signed: either a root CA or a certificate made for testing.

A fingerprint is a hash of the whole certificate. SHA-256 fingerprints are the standard way to pin or compare certificates; SHA-1 fingerprints are still shown by older tools such as Windows' certificate viewer. The SPKI SHA-256 hash covers only the public key, and stays the same when a certificate is renewed with the same key. To create a key pair for a new certificate, see the key pair generator.

Frequently asked questions

How do I check when an SSL certificate expires?
Paste the certificate and look at Validity: the Not after date is when it expires, and the badge shows how many days remain. To get a site's certificate, open it in your browser's certificate viewer and export it, or run openssl s_client -connect example.com:443 -showcerts.
What is the difference between PEM and DER?
They hold the same certificate. DER is binary; PEM is that binary in Base64 with BEGIN and END lines. This tool reads both.
Why does my browser say the name does not match?
The hostname must appear in the Subject Alternative Name extension. Browsers no longer look at the Common Name, so a certificate whose name is only in CN is rejected.
Can I decode a whole certificate chain?
Yes. Paste all the PEM blocks together, or drop a .pem or .p7b bundle. Each certificate is shown in order, and each signature is checked against the next certificate's key.
What does self-signed mean?
The certificate was signed with its own key rather than by a separate CA. Root CA certificates are self-signed by design; for a website, a self-signed certificate is only trusted where it has been installed by hand.
Can this decode a private key or a CSR?
No. It reads certificates only, and tells you if you paste a private key, public key or certificate signing request instead.
Is it safe to paste my certificate here?
Certificates are public — servers send them to every visitor — and decoding happens entirely in your browser regardless. Never paste a private key into any website.