This free online tool allows you to instantly decode X.509 certificates presented in the common PEM format. Simply paste the certificate content below, including the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- markers, and click "Decode Certificate".
You can extract and verify key details like the issuer, subject, validity period (not before/not after dates), serial number, signature algorithm, Subject Alternative Names (SAN), public key information, and certificate extensions.
🔒 Your privacy is protected: All certificate decoding happens entirely within your web browser using client-side JavaScript. Your certificate data is never sent to our server.
Understanding X.509 Certificates
What is an X.509 Certificate?
An X.509 certificate is a standard digital document, defined by the ITU-T, used to prove the ownership of a public key. Think of it like a digital passport. It securely binds an identity (like a website's domain name, an organization, or an individual) to a cryptographic public key. This binding is verified by the digital signature of a trusted issuer.
If the signature is valid and the software using the certificate trusts the issuer, then the public key contained within can be reliably used for secure communication (like HTTPS/TLS), email encryption, code signing, or digital signatures.
The most common format for these certificates is defined in the X.509 standard, with specifics further detailed in RFC 5280.
How are Certificates Issued?
In a typical Public Key Infrastructure (PKI), certificates are issued by a trusted entity called a Certificate Authority (CA). CAs are organizations responsible for verifying the identity of the entity requesting a certificate before issuing it. Many commercial CAs exist, but certificates can also be issued by internal CAs within an organization or even self-signed for testing or specific trust scenarios.
What is the Structure of an X.509 Certificate?
An X.509 certificate has a defined structure, usually containing the following key fields:
- Version: Indicates the X.509 version (v1, v2, or v3). Version 3 is the most common as it introduced support for extensions.
- Serial Number: A unique positive integer assigned by the CA to distinguish this certificate from others it has issued.
- Signature Algorithm: The identifier for the cryptographic algorithm used by the CA to sign the certificate (e.g., SHA-256 with RSA).
- Issuer: The Distinguished Name (DN) of the Certificate Authority that issued and signed the certificate.
- Validity Period: A pair of dates defining the period during which the certificate is valid:
- Not Before: The earliest date and time the certificate is valid.
- Not After: The date and time after which the certificate is no longer valid (expiry date).
- Subject: The Distinguished Name (DN) identifying the entity whose public key is contained in the certificate (e.g., the website domain). If the Issuer and Subject are the same, the certificate is self-signed.
- Subject Public Key Info: Contains the actual public key of the subject and identifies the algorithm (e.g., RSA, ECC) used to generate it.
- Issuer Unique Identifier (Optional, v2+): An optional identifier for the issuer, rarely used.
- Subject Unique Identifier (Optional, v2+): An optional identifier for the subject, rarely used.
- Extensions (Optional, v3): Allows for additional information to be included, critical for modern usage. Common extensions include:
- Subject Alternative Name (SAN): Allows specification of multiple identities (like multiple domain names or IP addresses) covered by the certificate.
- Key Usage: Defines the cryptographic purposes for which the public key can be used (e.g., digital signature, key encipherment).
- Extended Key Usage: Specifies additional purposes (e.g., server authentication, client authentication).
- Basic Constraints: Indicates if the certificate belongs to a CA and constraints on the certification path.
- Certificate Policies: Pointers to policy information regarding the certificate's usage.
- Authority Information Access (AIA): Provides information on how to access CA information (e.g., OCSP responders or issuing CA certificates).
- CRL Distribution Points (CDP): Specifies where to find Certificate Revocation Lists (CRLs).
- Certificate Signature Algorithm: The algorithm identifier used by the issuer to sign the certificate TbsCertificate (the core certificate fields). Must match the `Signature Algorithm` field within the main structure.
- Certificate Signature Value: The actual digital signature computed over the core certificate fields, verifying its integrity and authenticity.
Note: Fingerprints (Thumbprints) like SHA-1 or SHA-256 are not part of the certificate itself. They are calculated hashes of the entire encoded certificate and used as unique identifiers.
How is a Certificate Encoded and Formatted?
X.509 certificates are fundamentally binary data structures encoded using Abstract Syntax Notation One (ASN.1). The specific encoding rules used are typically the Distinguished Encoding Rules (DER), which provide a standardized binary representation defined in ITU-T X.690.
While certificates exist in this raw binary DER format (often with `.der` or `.cer` extensions), they are frequently distributed in the PEM (Privacy-Enhanced Mail) format. A PEM file is simply the Base64 encoding of the binary DER certificate, wrapped with plain text headers and footers:
-----BEGIN CERTIFICATE-----
(Base64 encoded DER certificate data...)
-----END CERTIFICATE-----
This text-based PEM format (common extensions: `.pem`, `.crt`, `.cer`) makes it easy to copy and paste certificates or include them in text-based documents and configurations. A single PEM file can also contain multiple certificates, often used for certificate chains.
Common Uses of X.509 Certificates:
- Securing Web Traffic (HTTPS/TLS): Authenticating web servers to clients (browsers) and enabling encrypted communication.
- Email Security (S/MIME): Signing emails to prove sender authenticity and encrypting emails for confidentiality.
- Code Signing: Verifying the publisher of software and ensuring the code hasn't been tampered with.
- Document Signing: Providing digital signatures on documents to ensure authenticity and integrity.
- Client Authentication: Authenticating users or devices to servers or networks.
Understanding the structure and details within an X.509 certificate is crucial for verifying identities, ensuring secure connections, and troubleshooting TLS/SSL issues. This decoder helps visualize these components from a standard PEM-formatted certificate.