X.509 Decoder

Decode X.509 certificates

Understanding X.509 Certificates
TL;DR

X.509 certificates are digital documents that bind a public key to an identity. They are the foundation of TLS/SSL — every HTTPS connection uses them.

What is X.509?

X.509 is an international standard (ITU-T X.509, also published as RFC 5280) that defines the format of public key certificates. An X.509 certificate is a digitally signed document that binds a public key to an identity — such as a domain name, an organization, or an individual. Certificates are the trust anchors of the internet: every HTTPS connection, every code-signed application, and every S/MIME email relies on X.509 certificates.

When you visit a website over HTTPS, your browser receives the server’s X.509 certificate, verifies that it was issued by a trusted Certificate Authority (CA), checks that it has not expired or been revoked, and confirms that the domain name matches. Only after all these checks pass does the browser establish an encrypted connection.

The X.509 standard was first published in 1988 as part of the X.500 directory services specification. The current version (v3) introduced extensions, which allow certificates to carry additional metadata such as Subject Alternative Names, key usage constraints, and revocation information. Version 3 certificates are used universally today.

Certificate Structure

Every X.509 v3 certificate contains the following fields, encoded in ASN.1 DER format and typically distributed in PEM (Base64-armored) form:

FieldDescriptionExample
VersionCertificate version (almost always v3)v3
Serial NumberUnique identifier assigned by the CA03:A1:F2:...
Signature AlgorithmAlgorithm used by the CA to signSHA256withRSA
IssuerDistinguished Name of the signing CACN=Let's Encrypt Authority X3, O=Let's Encrypt
Validity (Not Before)Start of the certificate’s validity period2024-01-15T00:00:00Z
Validity (Not After)End of the certificate’s validity period2024-04-14T23:59:59Z
SubjectDistinguished Name of the certificate holderCN=example.com
Public KeyThe subject’s public key and algorithmRSA 2048-bit
ExtensionsOptional v3 extensions (see table below)SAN, Key Usage, etc.

Common Extensions

Extensions give X.509 v3 certificates their flexibility. Some are marked as critical (the certificate must be rejected if the extension is not understood) and others are non-critical.

ExtensionOIDPurpose
Subject Alternative Name (SAN)2.5.29.17Lists additional identities (DNS names, IPs, emails) the certificate is valid for
Key Usage2.5.29.15Restricts the cryptographic operations the key may perform (e.g., digitalSignature, keyEncipherment)
Extended Key Usage (EKU)2.5.29.37Specifies purposes like TLS server auth, TLS client auth, or code signing
Authority Key Identifier (AKI)2.5.29.35Identifies the CA’s public key that signed this certificate
CRL Distribution Points2.5.29.31URLs where the Certificate Revocation List can be downloaded
Authority Information Access (OCSP)1.3.6.1.5.5.7.1.1URL for Online Certificate Status Protocol checks and CA issuer certificate retrieval

Chain of Trust

X.509 certificates do not exist in isolation. They form a chain of trust (also called a certificate chain or certification path) from the end-entity certificate back to a trusted Root Certificate Authority.

X.509 Chain of Trust Three stacked certificates representing the chain of trust. The Root CA (self-signed, stored in OS/browser trust store) signs the Intermediate CA certificate, which in turn signs the Leaf certificate for the end-entity domain. Arrows indicate the signing relationship. Root CA Certificate Self-signed | Stored in OS/browser trust store Issuer = Subject (self-signed) signs Intermediate CA Certificate Issued by Root CA | Issues end-entity certs Issuer = Root CA, Subject = Intermediate CA signs Leaf (End-Entity) Certificate Your domain: example.com Issuer = Intermediate CA, Subject = example.com Trust direction

The chain works as follows:

  1. Root CA: A self-signed certificate pre-installed in your operating system or browser’s trust store. Root CAs are the ultimate trust anchors — they are trusted because they have been vetted and explicitly included by OS and browser vendors (Apple, Microsoft, Mozilla, Google)

  2. Intermediate CA: A certificate signed by the Root CA (or another intermediate). Root CAs rarely sign end-entity certificates directly. Instead, they delegate to intermediates, which limits exposure — if an intermediate is compromised, only that intermediate needs to be revoked, not the root

  3. Leaf (End-Entity) Certificate: The certificate presented by the server (your website). It is signed by an intermediate CA and contains the server’s public key and domain name(s)

During a TLS handshake, the server sends the leaf certificate and any intermediates. The client builds the chain up to a trusted root and verifies every signature in the path. If any link is broken — expired, revoked, or signed by an untrusted CA — the connection fails.

Certificate Transparency

Certificate Transparency (CT) is a system of public, append-only logs that record every certificate issued by participating CAs. CT allows domain owners and the public to detect misissued or fraudulent certificates. Since 2018, Google Chrome requires all publicly trusted certificates to be logged in at least two CT logs.

Common Use Cases

  • HTTPS / TLS: Every secure website uses an X.509 certificate to prove its identity and enable encrypted communication. The browser verifies the certificate chain before establishing the TLS connection
  • Code signing: Software developers sign executables, drivers, and packages with X.509 certificates so that operating systems and users can verify the code has not been tampered with and comes from a known publisher
  • Email signing and encryption (S/MIME): X.509 certificates enable end-to-end email encryption and digital signatures, proving the sender’s identity and ensuring message integrity
  • Mutual TLS (mTLS): In zero-trust architectures, both the client and server present certificates to authenticate each other. This is common in service-to-service communication within microservice architectures
  • VPN authentication: Enterprise VPNs use X.509 certificates for client authentication, replacing or complementing username/password login
  • Document signing: PDF digital signatures use X.509 certificates to provide non-repudiation — proof that the signer signed the document and it has not been altered
  • IoT device identity: Connected devices use X.509 certificates to authenticate to cloud platforms (AWS IoT, Azure IoT Hub), ensuring only authorized devices can connect

Try These Examples

Valid PEM Certificate Valid

A PEM-encoded X.509 certificate wrapped in BEGIN/END markers. The Base64 content between the markers encodes the DER (binary) certificate structure containing the subject, issuer, public key, validity period, and extensions.

-----BEGIN CERTIFICATE----- MIIBkTCB+wIUEjRW...base64...== -----END CERTIFICATE-----
Expired Certificate Invalid

A structurally valid PEM certificate whose notAfter date has passed. The decoder will parse the certificate but flag it as expired. Browsers and TLS clients reject expired certificates to prevent use of potentially compromised keys.

-----BEGIN CERTIFICATE----- MIIC...expired...== -----END CERTIFICATE-----