Skip to content

X.509 certificate decoder

Paste a certificate to read its subject, issuer, validity, public key, extensions and fingerprints. A whole chain works too.

Runs in your browser. Nothing you paste is sent to us.

Certificate

A sample self-signed certificate for auth.example.com is filled in. Paste yours; a chain of several works too.

Decoding reads the certificate; it does not check its signature or whether anything trusts it.

Certificate

X.509 v3 RSA, 2048 bits Self-issued

Subject
C=US, ST=California, O=Example Corp, OU=Sample certificate, not real, CN=auth.example.com
Issuer
C=US, ST=California, O=Example Corp, OU=Sample certificate, not real, CN=auth.example.comSame as the subject
Serial number
ae:7d:49:f7:4a:9e:76:67
Not before
Wed, 25 Nov 2026 09:51:13 GMT
Not after
Sat, 22 Nov 2036 09:51:13 GMT
Public key
RSA, 2048 bitsExponent 65537
Signature algorithm
sha256WithRSAEncryption1.2.840.113549.1.1.11
SHA-256 fingerprint
…
SHA-1 fingerprint
…Shown because tools still print it; compare with SHA-256

Extensions

Subject alternative names
DNS:auth.example.comDNS:*.auth.example.comIP:192.0.2.10IP:2001:db8::1URI:https://auth.example.com/realms/acme
Basic constraints
CA: no (end-entity certificate)Critical
Key usage
Digital signatureKey enciphermentCritical
Extended key usage
TLS server authentication (serverAuth) (1.3.6.1.5.5.7.3.1)TLS client authentication (clientAuth) (1.3.6.1.5.5.7.3.2)
Subject key identifier
e4:cc:8d:ca:19:08:0f:5f:a9:07:76:03:f5:b2:55:dc:6c:4b:36:11
Authority key identifier
Key id: e4:cc:8d:ca:19:08:0f:5f:a9:07:76:03:f5:b2:55:dc:6c:4b:36:11
CRL distribution points
URI:http://crl.example.com/ca.crl
Authority information access
OCSP: URI:http://ocsp.example.comCA issuers: URI:http://ca.example.com/ca.crt
Certificate policies
Organization validated (OV) (2.23.140.1.2.2)
Public key (PEM)
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzHZIWJTQtoqNPb8rIZ3F
JXyR/djxqX4j0o7deufi8zjftkess6qmxhLdhrPQorWnDTX35MAJyEC/x86ytN1m
qSSZaVmH5eOTaBP6RTlg/XIligXnIBopE4XHSxcndKuApGmllf65K2xlG0AiJqm/
igtvXIg0G9TdpzCCLproDOUc2hmn7lPmYa9myQycv/ABjdo79zi6n5LF9yd2YrcO
X6Y4hBLIfwUyvb/KMNWu31QPqZJLPdv0NTlrsiAj1zhv7EYe2QRWWLptOFm1kVZJ
uKATKhEYXtlA+FtybhJDJpRiwXOwMVoV4f/0ERFtEkXsTaEGTPVg1S07HG26wjjn
hQIDAQAB
-----END PUBLIC KEY-----

How to use it

  1. Paste the PEM certificate, or just its Base64.
  2. Check the validity notice for expiry.
  3. Read the subject alternative names for the host names it covers.
  4. Compare the SHA-256 fingerprint with the one you expect.

What to know

An X.509 certificate binds a public key to names, signed by an issuer. The decoder reads the DER structure in your browser and shows the fields openssl x509 -text shows.

Keycloak shows a realm’s signing certificate on the Keys tab as Base64 without the BEGIN and END lines, and SAML metadata carries certificates the same way. Paste that Base64 as it is.

Decoding does not check the signature or whether anything trusts the certificate. It tells you what the certificate says, not whether to believe it.

What an X.509 certificate is

An X.509 certificate binds a public key to a name. It says, in effect: "this public key belongs to auth.example.com, and I, the issuer, vouch for that until this date." The issuer signs the statement with its own private key, so anyone who trusts the issuer can trust the binding.

Certificates secure every HTTPS connection, and they appear throughout identity systems: the TLS certificate of the sign-in page, the signing certificate in SAML metadata, the certificate that wraps a realm’s token signing key, and client certificates for mutual TLS.

The format is defined in RFC 5280. Certificates are encoded in DER, a binary form of ASN.1, and usually shared as PEM: the DER bytes in Base64 between BEGIN CERTIFICATE and END CERTIFICATE lines.

What is inside a certificate

FieldWhat it holdsWhat to check
VersionAlmost always 3, which allows extensionsVersion 1 certificates have no extensions
Serial numberA number unique per issuerUsed in revocation lists and to identify a certificate
Signature algorithmHow the issuer signed, such as sha256WithRSAEncryptionSHA-1 and MD5 signatures are no longer trusted
IssuerThe distinguished name of the signerEqual to the subject for self-signed certificates
ValiditynotBefore and notAfter dates, in UTCExpiry is the most common certificate outage
SubjectThe distinguished name of the ownerBrowsers ignore its CN for host name checks
Public keyAlgorithm, size or curve, and the keyRSA under 2048 bits is too weak
ExtensionsNames, usages, constraints, links to the issuerSubject alternative names decide which hosts are covered

Distinguished names

Subject and issuer are distinguished names: a list of attributes such as C (country), O (organization), OU (organizational unit) and CN (common name). The decoder shows them in the order they are stored, the same order openssl x509 -text uses.

The extensions that matter most

  • Subject alternative names (SAN): the DNS names, IP addresses, URIs or emails the certificate covers. Browsers check host names only here.
  • Basic constraints: whether the certificate belongs to a certificate authority (CA) that may sign other certificates, and how deep a chain below it may go.
  • Key usage: what the key may do, such as digital signature, key encipherment or certificate signing.
  • Extended key usage: the purposes, such as TLS server authentication (serverAuth) or client authentication (clientAuth).
  • Subject and authority key identifiers: hashes that link a certificate to the key of the CA that signed it.
  • CRL distribution points and authority information access: where to check revocation (CRL, OCSP) and where to fetch the issuer’s certificate.

What this decoder does and does not do

  • It reads PEM certificates, a whole chain of them, or bare Base64 without the BEGIN and END lines.
  • It decodes the fields above with a small DER parser written for this page, and names common object identifiers.
  • It shows SHA-256 and SHA-1 fingerprints computed with Web Crypto, and extracts the public key as PEM.
  • It warns about expiry, missing subject alternative names, short RSA keys, SHA-1 or MD5 signatures, and chains in the wrong order.
  • It does not verify the signature, check revocation, or decide whether a certificate is trusted. Trust depends on the root store of the system doing the checking.

We checked the decoder against openssl x509 -text on certificates with RSA and EC keys and the usual extensions, and the fields and fingerprints matched.

How to decode a certificate

  1. Paste the certificate in PEM form, or just the Base64 text. A sample self-signed certificate for auth.example.com is filled in to start with.
  2. Read the validity notice at the top: valid, not yet valid, or expired, with the days left.
  3. Check the subject alternative names cover every host name you serve.
  4. Check the issuer, and for a chain, that each certificate’s issuer is the next one’s subject.
  5. Compare the SHA-256 fingerprint with the one you expect, if you are pinning or confirming a certificate.
Getting a certificate to paste (replace the host name with yours)
# A live server's certificate
openssl s_client -connect auth.example.com:443 -servername auth.example.com </dev/null 2>/dev/null | openssl x509

# The whole chain the server sends
openssl s_client -connect auth.example.com:443 -servername auth.example.com -showcerts </dev/null

Certificates in Keycloak

Keycloak uses certificates in several places, and the decoder helps with each.

Realm keys

Every realm signing key has a certificate. Under Realm settings, Keys, the Certificate button shows it as Base64 without PEM lines. Paste that text straight into the decoder. These certificates are usually self-signed; applications trust the key by fetching it from the realm, not through a CA.

SAML metadata

SAML identity provider and service provider metadata carry signing and encryption certificates in X509Certificate elements, again as bare Base64. When a SAML integration fails with a signature error, decoding both sides’ certificates and comparing fingerprints quickly shows whether they changed.

The server’s TLS certificate

Keycloak can serve HTTPS itself with a PEM certificate and key (the https-certificate-file and https-certificate-key-file options), or sit behind a reverse proxy that terminates TLS. Either way, the certificate must cover the public host name users see, and should include the intermediate certificates in the chain.

Client certificates

With mutual TLS, clients present certificates. Keycloak can authenticate OAuth clients by certificate (the X509 Certificate client authenticator) and sign in users with the X.509 client certificate authenticator, matching certificate fields such as the subject or a SAN to the user.

Common certificate problems

SymptomLikely causeWhat to look at
Browser says the name does not matchThe host is not in the SAN extensionSubject alternative names
Works in browsers, fails in Java or curlThe server does not send the intermediate certificatePaste the full chain; it should have more than one certificate
Sudden failures across many servicesThe certificate expiredNot after
SAML signature validation fails after a changeThe other side rotated its signing certificateCompare SHA-256 fingerprints
Client certificate rejectedMissing clientAuth usage or wrong issuerExtended key usage and issuer
Old clients reject a new certificateA newer key type or signature algorithmPublic key and signature algorithm

Certificate lifetimes are getting shorter

Public TLS certificates have a maximum lifetime set by the CA/Browser Forum, and it keeps shrinking. The forum has voted to reduce it in steps over the next few years, to 47 days by 2029. In practice that means certificate renewal must be automated, for example with ACME, rather than done by hand once a year.

This does not apply to self-signed certificates such as Keycloak’s realm key certificates, or to certificates from a private CA, which follow your own policy.

Security notes

  • A certificate is public. Pasting one here is safe; it contains no private key. Never paste a private key into a decoder.
  • Decoding tells you what a certificate claims. Whether to believe it is a separate check, done by validating the chain to a trusted root.
  • Prefer SHA-256 fingerprints for comparisons. SHA-1 fingerprints are shown because many tools still print them.
  • Watch for unexpected CA flags. An end-entity certificate with CA: yes could sign other certificates.

Best practices

  • Automate renewal and monitor expiry dates, with alerts weeks ahead.
  • Always serve the full chain: your certificate followed by the intermediates.
  • List every host name in the SAN extension, including the bare domain if you serve it.
  • Use RSA 2048 or larger, or ECDSA P-256, with SHA-256 signatures.
  • Record the SHA-256 fingerprint of signing certificates you rely on, so you notice when they change.
Questions

Frequently asked questions

How do I check when an SSL certificate expires?

Paste it here and read the Not after date and the notice above it. From the command line, openssl x509 -in cert.pem -noout -enddate prints the same date.

What is the difference between the subject CN and subject alternative names?

The common name is an old field in the subject. Browsers ignore it for host name checks and look only at the subject alternative names. Every host a certificate should cover must be listed as a SAN.

What is a certificate fingerprint?

A hash of the whole certificate in DER form. Two certificates with the same SHA-256 fingerprint are the same certificate, so fingerprints are a quick way to compare or pin one.

Is it safe to paste a certificate into an online decoder?

Yes, a certificate is public information. This decoder also runs in your browser and sends nothing. Never paste a private key, though.

How do I see a Keycloak realm certificate?

In the admin console, open Realm settings, Keys, and press Certificate next to the key. Copy the Base64 and paste it here; the PEM lines are optional.

Why does my certificate work in the browser but fail in curl or Java?

Usually the server does not send its intermediate certificate. Browsers can sometimes find it themselves; most other clients cannot. Configure the server to send the full chain.

What does self-signed mean?

The certificate’s issuer is its own subject, signed by its own key. Nobody else vouches for it, so it is trusted only where it is explicitly configured, as with SAML signing certificates and realm keys.

Does this tool check whether a certificate is revoked?

No. It shows where the CRL and OCSP responder are, but checking them needs network requests, and this page makes none.

Rather not run Keycloak yourself?

We run it for you on a cluster of your own, with backups, upgrades and written support. Starter and Premium begin with a 7-day trial.