Paste PEM text below, or open a file, to see what is inside it. The decoder reads certificates, certificate signing requests (CSRs) and public keys, and it never leaves your browser. If you only want to read an SSL/TLS certificate, use the certificate decoder.
Paste or drop PEM text below, or open a PEM file
A PEM file is plain text that holds binary data as base64 between a -----BEGIN LABEL----- line and a matching -----END LABEL----- line. The label says what kind of data it is. The format is described in RFC 7468. Because it is only text, it survives being pasted into an email or a web form.
One file can hold several blocks, for example a server certificate followed by its intermediate certificates, or a certificate next to its key. Text outside the blocks is ignored. Extensions such as .pem, .crt, .cer, .csr and .key are only habits: the label inside the file is what counts. If you only need to read an SSL/TLS certificate, the certificate decoder home page explains every row of the result.
This is what the page does with each label. "Listed, not decoded" means the page tells you the block is there and which openssl command reads it. Up to 10 certificates, CSRs and public keys are decoded from one input.
| Label | What it is | On this page |
|---|---|---|
CERTIFICATE, X509 CERTIFICATE | An X.509 certificate | Decoded |
CERTIFICATE REQUEST, NEW CERTIFICATE REQUEST | A certificate signing request (CSR) | Decoded |
PUBLIC KEY | A public key, in the general SPKI format | Decoded |
RSA PUBLIC KEY | An RSA public key, in the older PKCS#1 format | Decoded |
PRIVATE KEY, ENCRYPTED PRIVATE KEY, RSA PRIVATE KEY, EC PRIVATE KEY, DSA PRIVATE KEY, OPENSSH PRIVATE KEY, and any other label containing PRIVATE KEY | A private key | Ignored on purpose: never read or decoded |
TRUSTED CERTIFICATE | An OpenSSL certificate with trust settings | Listed, not decoded |
X509 CRL | A certificate revocation list | Listed, not decoded |
PKCS7, CMS | A bundle of certificates, or a signed message | Listed, not decoded |
EC PARAMETERS, DH PARAMETERS, DSA PARAMETERS | Key parameters | Listed, not decoded |
Any other label is listed as an unknown block, without a command.
The page above does this for you. On your own machine, openssl reads each type like this:
openssl x509 -in cert.pem -noout -text
openssl req -in request.csr -noout -text -verify
openssl pkey -pubin -in public.pem -noout -text
TRUSTED CERTIFICATE): openssl x509 -in file.pem -noout -text
X509 CRL): openssl crl -in file.pem -noout -text
PKCS7): openssl pkcs7 -in file.pem -print_certs -noout
CMS): openssl cms -inform PEM -in file.pem -cmsout -print
openssl ecparam -in file.pem -noout -textor
openssl dhparam or openssl dsaparam in the same way.A certificate and its private key belong together when they share the same public key. You can test that without ever showing the private key to a website. First, on your own machine, print the public half of the key:
openssl pkey -in key.pem -pubout
Paste that output (a BEGIN PUBLIC KEY block) into the box next to the certificate, or next to the CSR, and press Decode PEM. The summary says which certificate each public key or CSR matches, or that it matches none. The comparison is exact: the whole public key, including its algorithm, must be identical.
Or skip the page and compare hashes locally. The two commands print the same value when the key belongs to the certificate:
openssl x509 -in cert.pem -noout -pubkey | openssl sha256 openssl pkey -in key.pem -pubout | openssl sha256
If the key file is encrypted, openssl asks for the passphrase on your machine; it never reaches this page.
DER is the same data in its raw binary form; PEM is that binary turned into base64 text with BEGIN and END lines. This page opens PEM text, DER files, and bare base64 with no BEGIN and END lines (as found in SAML metadata). For bare base64 and DER, the page tries a certificate first, then a CSR, then a public key, and fills the box with the PEM it made. A DKIM public key works too: paste the whole DNS record (v=DKIM1; k=rsa; p=MIIB…) or just the key, and the page takes the key after p=. The longer explanation of PEM, CRT, CER and DER is on the home page.
Yes, for certificates, CSRs and public keys, which are all meant to be shared. Decoding runs in JavaScript inside your browser, and nothing you paste or open is uploaded. The page's analytics record how many certificates, CSRs and public keys were decoded, how the input arrived (pasted or from a file; as PEM, DER or base64) and whether a private key was present and ignored, never anything from inside them. Do not paste a private key: this page does not need one, and it does not read one.
On purpose. A private key is the one secret that protects a certificate, and it should stay on the server it belongs to; there is nothing a decoder can tell you that is worth the risk of typing it into a web page. If a pasted or opened text holds a block with PRIVATE KEY in its label (including ENCRYPTED PRIVATE KEY and OPENSSH PRIVATE KEY), the page only says that one was found; it is never decoded, and for an opened file it is removed from the box. There is no passphrase field. To work with a key, use openssl on your own machine.
Without pasting the private key: run openssl pkey -in key.pem -pubout on your own machine, then paste the public key it prints into the box next to the certificate. The summary says which certificate the public key matches, or that it matches none. You can also compare hashes locally: openssl x509 -in cert.pem -noout -pubkey | openssl sha256 and openssl pkey -in key.pem -pubout | openssl sha256 print the same value when the key belongs to the certificate.
BEGIN PUBLIC KEY is the general format (SubjectPublicKeyInfo, or SPKI): it names the algorithm, so it can hold RSA, EC, Ed25519 and other keys. BEGIN RSA PUBLIC KEY is the older PKCS#1 format and holds an RSA key only, with no algorithm name. This page reads both, and shows them the same way. To convert one to the other, use openssl rsa -RSAPublicKey_in -in old.pem -pubout.
Yes. Paste or open a certificate signing request (BEGIN CERTIFICATE REQUEST or BEGIN NEW CERTIFICATE REQUEST, usually a .csr file) and the page shows the subject, the names requested in Subject Alternative Names and the public key, and checks the request's signature. If your browser cannot check the signature algorithm (for example secp256k1, brainpool curves, DSA, Ed448 or MD5), it says the signature was not checked rather than guessing. A CSR and a certificate in the same input are compared, and the summary says whether they share a public key.
A .pfx or .p12 file (PKCS#12) is binary and usually holds a private key, so this page does not accept it. A .p7b file (PKCS#7) is not decoded here either. Convert it on your own machine instead: openssl pkcs12 -in bundle.pfx -nokeys -clcerts prints the certificate without the key, and openssl pkcs7 -print_certs -in bundle.p7b prints the certificates in a .p7b bundle. Paste the PEM output here.
Try StatusAlert – SSL certificate expiry monitoring, 100% free while in beta.
Try it free