How the SSL Certificate Decoder (X.509 & CSR) Works
When a TLS handshake fails, the answer is almost always in the certificate: an expired date, a host name missing from the Subject Alternative Names, an intermediate left out of the chain, or a chain in the wrong order. This decoder reads PEM text (a single certificate, a whole chain, a CSR or a public key), Base64 or hex DER, and .crt, .cer, .der and .p7b files, and shows what matters in plain words: who it's for, who issued it, when it expires relative to your clock, every SAN, the key type and size, the signature algorithm, key usage, extended key usage, basic constraints, CRL and OCSP URLs, and SHA-256 and SHA-1 fingerprints plus an SPKI pin. For a chain, it orders the certificates leaf to root and verifies each signature with the issuer's public key. It flags the classic mistakes — no SANs on a server certificate, SHA-1 signatures, RSA keys under 2048 bits, validity periods too long for public TLS. Its output is tested field by field against OpenSSL for RSA, ECDSA P-256 and P-384, Ed25519 and RSA-PSS certificates, a CSR and a three-certificate chain. Private keys are refused before anything is parsed.
Parsing
PEM blocks are found by their BEGIN/END markers (Windows line endings, extra whitespace and RFC 1421 headers are tolerated), Base64-decoded, and read with a strict DER parser that reports truncated or malformed data with a byte offset. Names are shown in RFC 2253 order like openssl -nameopt RFC2253, with UTF-8, PrintableString, BMPString and Teletex strings decoded.
Chains
Each certificate's issuer is matched to another certificate's subject, confirmed by the Authority and Subject Key Identifiers when present. The leaf is the certificate that issued nothing; the chain is followed to a self-signed root or to the last certificate present. Signatures are verified with Web Crypto: RSA PKCS#1 v1.5, RSA-PSS, ECDSA on P-256/384/521, and Ed25519 where the browser supports it.
Private key detection
Before decoding, the input is checked for private key PEM headers, PuTTY keys and the DER structures of PKCS#8, PKCS#1, SEC 1 and encrypted private keys. If one is found the input is cleared immediately, so the key never reaches the page state, the share system or storage.
Fingerprints
Fingerprints are the SHA-256 and SHA-1 hashes of the certificate's DER bytes, matching openssl x509 -fingerprint and what browsers show. The SPKI pin is the Base64 SHA-256 of the public key info, the format used for certificate pinning in Android network security config and HPKP-style pins; it stays the same when a certificate is renewed with the same key.