Certificate Decoder
Paste a PEM certificate, chain or CSR and see every field, date and check. Nothing leaves your browser.
- 0
- Certificates
- 0
- Days left
- 0
- Errors
On this page
About Certificate Decoder
Updated
What is a Certificate Decoder?
A Certificate Decoder, or SSL certificate decoder, reads an X.509 certificate and shows what is inside. The certificate is the file a website uses for HTTPS. You see who it is for, who issued it, when it expires, the key and every extension. You may also know the tool as an X.509 decoder or a PEM decoder. This one reads a whole certificate chain at once. It checks the signature of each certificate whose issuer is in the paste. It also finds the problems that make browsers show a warning. It decodes in your browser, so the certificate never leaves your computer.
How to use this tool
Paste one or more PEM blocks, or drop a .crt, .cer, .pem or .der file. Text around the blocks, such as the subject= lines that openssl writes, is fine. The Result pane opens on Certificates, with one card per certificate. Click a line in the editor to go to its card. Chain shows the certificates from the server certificate up to the root. Text prints everything as openssl x509 -text does, and ASN.1 shows the raw structure as a tree.
Fix PEM repairs the formatting. It puts back five dashes and real line breaks for \n. It also fixes Base64URL, lines that are not 64 characters, and bare Base64 with no BEGIN line. Sort chain puts the certificates in the order servers send them, leaf first, and drops copies. The tool also reads a CSR. For a page made for CSRs, use the CSR Decoder.
What the colours mean
A broken PEM is marked at the exact line and column, with the reason and the fix. When a line of Base64 is missing, the tool says how many bytes are short and near which line. A note with an orange triangle means that browsers reject the certificate. It has expired, a chain link does not match, or it uses SHA-1, MD5 or a key that is too short. A note with an outline triangle is a risk to look at. It expires soon, the chain is in the wrong order, or the common name is not in the SANs.
Customization
Open Options to show times in UTC or in your local time, and to write fingerprints as AA:BB or aabb. The tool remembers your choices.
Common errors an SSL certificate decoder finds
Four dashes, or a missing END line
A PEM block needs exactly five dashes on each side of BEGIN and END. Copy and paste can drop a dash or the last line:
----BEGIN CERTIFICATE----
MIIBszCCAVmgAwIBAgIUQ2n3...
...7wKqA0Z5Q==Put back five dashes and the END line, or press Fix PEM:
-----BEGIN CERTIFICATE-----
MIIBszCCAVmgAwIBAgIUQ2n3...
...7wKqA0Z5Q==
-----END CERTIFICATE-----Line breaks written as \n
A certificate stored in JSON, an environment variable or a YAML string often has \n as two characters, not real line breaks. Many libraries then fail with an error about a bad PEM:
-----BEGIN CERTIFICATE-----\nMIIBszCCAVmgAwIBAgIUQ2n3...\n-----END CERTIFICATE-----Change each \n to a real line break. Fix PEM does it for you:
-----BEGIN CERTIFICATE-----
MIIBszCCAVmgAwIBAgIUQ2n3...
-----END CERTIFICATE-----The chain in the wrong order
A server must send its own certificate first, then each issuer. Some servers accept a chain file with the root first, and some clients then fail:
# Root CA
-----BEGIN CERTIFICATE-----
...
# example.com
-----BEGIN CERTIFICATE-----
...
# Intermediate CA
-----BEGIN CERTIFICATE-----
...Put the leaf first and the root last. You can leave the root out, since clients have it already. Sort chain does this:
# example.com
-----BEGIN CERTIFICATE-----
...
# Intermediate CA
-----BEGIN CERTIFICATE-----
...
# Root CA
-----BEGIN CERTIFICATE-----
...A name only in the common name
Browsers read the host name only from the Subject Alternative Name extension. A certificate with the name only in CN gets a name warning. When you make the CSR, add the names as SANs:
openssl req -new -key example.key -subj "/CN=example.com" \
-addext "subjectAltName=DNS:example.com,DNS:www.example.com" -out example.csrX.509 certificates
A certificate joins a public key to a name, and a certificate authority (CA) signs it to say that the name is right. TLS, the protocol behind HTTPS, sends the certificate to the browser. The browser then checks the signature, the dates and the name before it trusts the key.
The certificate chain
An intermediate CA signs the server certificate (the leaf), and a root CA signs the intermediate. The browser has the roots. The server must send the leaf and the intermediates. A missing intermediate is the most common chain error. Some browsers find it themselves and others fail. So the site works on one computer and not on the next. Paste the full chain here to check that each link signs the next.
The fields
- Subject: who the certificate is for. On a TLS certificate the names are in the SAN extension.
- Issuer: the CA that signed it.
- Not Before and Not After: the dates it is valid. A public TLS certificate issued from 15 March 2026 lasts at most 200 days. The limit drops to 100 days in 2027 and to 47 days in 2029.
- Public key: RSA (2048 bits or more) or an elliptic curve key such as P-256.
- Fingerprint: a hash of the whole certificate in DER form. The tool shows SHA-256 and SHA-1. Two copies of a certificate have the same fingerprint. Use it to check that the certificate on a server is the one you installed.
- Extensions: Key Usage, Extended Key Usage, Basic Constraints (is it a CA?), key IDs, OCSP and CRL addresses, and the Certificate Transparency timestamps.
PEM and DER
DER is the binary form of a certificate. PEM is DER in Base64, wrapped at 64 characters, between BEGIN and END lines (RFC 7468). A .crt or .cer file can be in either form. To change a DER file, such as a binary .crt, to PEM, run openssl x509 -in cert.der -inform DER -out cert.pem. To see the dates in a certificate as Unix time, use the Epoch Converter.
Other certificate resources
- RFC 5280: X.509 Certificate and CRL ProfileThe standard for certificates: every field, every extension and how a chain is checked.
- RFC 7468: Textual Encodings (PEM)The BEGIN and END lines, the labels and the Base64 rules of a PEM file.
- RFC 2986: PKCS #10 Certification RequestThe format of a CSR: subject, public key, attributes and the signature.
- CA/Browser Forum Baseline RequirementsThe rules public TLS certificates must follow: SANs, key sizes and the lifetime limits.
- openssl x509 manualThe command that prints, converts and checks certificates: -text, -noout, -fingerprint.
- openssl req manualThe command that makes and prints CSRs, with -addext for SANs.
- @peculiar/x509The JavaScript library this tool uses to make its examples. The tool checks signatures with the browser's Web Crypto API.
Certificate Decoder FAQ
How do I decode a certificate?
Paste the PEM text, from -----BEGIN CERTIFICATE----- to -----END CERTIFICATE-----, in the editor. Or drop the .crt, .cer, .pem or .der file on it. The tool decodes as you type. Each certificate gets a card with its names, dates, key and fingerprints. A whole chain or a CA bundle works too.
How do I decode a certificate with openssl?
Run openssl x509 -in cert.. For a DER file, add -inform DER. openssl prints only the first certificate in a file. The Text view here prints every certificate in the paste in the same layout, so you can compare the two.
How can I check if an SSL certificate is valid?
Look at the dates first. The card says how many days are left. A note with an orange triangle shows when the certificate has expired or is not valid yet. Then paste the whole certificate chain that the server sends. The Chain view checks that each certificate is signed by the next one.
The tool also checks the rules for public TLS certificates, from the CA/Browser Forum. Each name must be in a SAN. An RSA key must have at least 2048 bits. The signature must not use SHA-1. The lifetime must be within the limit: 200 days for certificates issued from 15 March 2026.
The tool does not check revocation or which roots your system trusts. For a live server, openssl s_client -connect example. prints the chain it sends. openssl sends the host name from -connect to the server. If you connect to an IP address, add -servername with the site name. Without it, a shared server can send the certificate of a different site.
Is a PEM file the same as a CRT file?
Often, yes. .crt and .cer are names for a certificate file. The content can be PEM (Base64 text with BEGIN and END lines) or DER (binary). .pem says only that the file is PEM text. It can hold a certificate, a chain, a key or a CSR. Open the file in a text editor: if you see -----BEGIN, it is PEM. This tool reads both.
To change CRT to PEM, first look at the file. If it starts with -----BEGIN CERTIFICATE-----, it is PEM already: rename it to .pem. If it is binary, run openssl x509 -in cert.. The same command works for a .cer file.
What is inside a PEM file?
A PEM file is Base64 text between a BEGIN line and an END line. The label on the lines says what the data is: CERTIFICATE, CERTIFICATE REQUEST, PRIVATE KEY or PUBLIC KEY. Inside the Base64 is DER, the binary ASN.1 form of the certificate. The ASN.1 view shows that structure as a tree.
How do I decode a PFX or P12 file?
A .pfx or .p12 file is a binary PKCS #12 bundle. It holds the certificate together with its private key, behind a password. Take the certificates out with openssl pkcs12 -in file., then paste cert.pem here. An old PFX file can fail on OpenSSL 3 with an "unsupported" error. Then add -legacy to the command. Do not upload a PFX file to a website: it holds the private key.
Is it safe to paste my certificate here?
Yes. The tool decodes in your browser, in JavaScript on this page. The certificate or CSR is never uploaded, stored or logged, and nothing is put in the URL. A certificate and a CSR are public data anyway: the server sends its certificate to every visitor. A private key is different. Never paste one into a website. If this tool finds a private key in the paste, it does not read it and tells you so.
How do I check if a certificate is X.509?
Almost every TLS certificate is X.509 (RFC 5280). Open the file in a text editor. If it starts with -----BEGIN CERTIFICATE-----, it is an X.509 certificate in PEM form. To be sure, paste it here. The tool shows a card for an X.509 certificate. It also shows a card for a CSR, which is not a certificate. For other data, such as a PGP key or an SSH key, it shows an error. With openssl, run openssl x509 -in cert.. No output means the file is X.509.