NetSecTools

Home / Guides / How to Decode X.509 Certificates and CSRs Offline

How to Decode X.509 Certificates and CSRs Offline

· 7 min read

Before you install a new TLS certificate on a reverse proxy or send a Certificate Signing Request (CSR) to a Certificate Authority, you should inspect every field inside the PEM block. Checking the subject, extensions and key parameters catches misconfigured hostnames, weak key sizes and imminent expirations before they trigger browser warnings in production.

You can decode certificates and PKCS#10 CSRs directly in your browser without sending a single byte over the network using our X.509 / PEM Certificate & CSR Decoder.

Why you should never upload internal certificates or CSRs

Public leaf certificates issued by public CAs eventually appear in Certificate Transparency logs anyway, but many certificates and CSRs you inspect during engineering work are not public:

  • Internal PKI and mTLS certificates: They reveal internal .corp or .local hostnames, service naming conventions, private IP SANs and internal CA hierarchies.
  • Unissued CSRs and staging configs: A CSR for an upcoming product launch, acquisition domain or unreleased API endpoint exposes planned infrastructure before DNS is public.
  • Client and S/MIME certificates: These often embed employee email addresses, organizational unit names and user identifiers in the Subject and SAN extensions.

When you paste PEM blocks into a server-backed web tool, that server (and its access logs, proxies or third-party scripts) receives your certificate data. Parsing ASN.1 DER structures locally in memory keeps the entire inspection on your machine—the same reason sensitive tokens belong in an offline JWT Decoder rather than server-side tools.

Five fields to check in every certificate or CSR

1. Subject vs. Subject Alternative Names (SANs)

Legacy tutorials still focus on the Common Name (CN=example.com) inside the Subject DN. Modern TLS clients—including Chrome, Firefox, Safari, curl and Go’s standard library—ignore CN completely when validating server hostnames. Instead, they require the exact domain or wildcard (*.example.com) to appear in the Subject Alternative Name (subjectAltName / SAN) extension.

Always verify that:

  • Every apex domain, subdomain and wildcard your service answers for is listed in SANs.
  • For a CSR, the Requested Extensions section actually contains the SAN list; some CAs copy only SANs present in the CSR unless overridden at issuance time.

2. Validity dates (Not Before and Not After)

Check both ends of the validity window in UTC:

  • Confirm Not Before is already in the past (a clock-skew mismatch on newly issued certs can cause immediate failures).
  • Check remaining days until Not After. Automated ACME certificates (such as Let’s Encrypt) are valid for 90 days or less, and industry baselines are moving toward even shorter lifetimes, so alerting well before 30 days remaining is essential.

3. Key algorithm and key size

Inspect the SubjectPublicKeyInfo block to verify cryptographic strength:

  • RSA: Use at least RSA 2048-bit (4096-bit for roots or long-lived intermediates). Reject 1024-bit keys immediately.
  • ECDSA: P-256 (prime256v1) and P-384 (secp384r1) offer equivalent or stronger security with much smaller handshakes and faster signing than RSA 2048.
  • Ed25519: Supported across modern TLS stacks for SSH and internal PKI, though public WebPKI CAs predominantly issue RSA and ECDSA.

Also verify the certificate’s signature algorithm (for example sha256WithRSAEncryption or ecdsa-with-SHA256) and reject legacy sha1 or md5 signatures.

4. Basic Constraints (CA: true vs. CA: false)

In an end-entity (leaf) server certificate, Basic Constraints should state CA: false (or be omitted/false) so the leaf cannot act as a subordinate CA. Intermediate and root certificates must carry CA: true, often paired with a pathLen limit (such as pathLen: 0 for an issuing intermediate that cannot sign further sub-CAs).

5. SHA-256 fingerprint

The SHA-256 fingerprint is the cryptographic digest of the DER-encoded certificate. Compare it when:

  • Pinning a self-signed or private CA certificate in configuration management.
  • Confirming that the leaf certificate installed on your load balancer matches the exact PEM bundle your CA issued.

OpenSSL commands vs. instant browser inspection

If you have OpenSSL on a workstation, these commands inspect PEM certificates and CSRs locally:

Decode an X.509 certificate:

openssl x509 -in cert.pem -text -noout

Print only validity dates, SANs, or the SHA-256 fingerprint:

openssl x509 -in cert.pem -noout -dates -ext subjectAltName -fingerprint -sha256

Decode a PKCS#10 CSR and verify its self-signature:

openssl req -in request.csr -text -noout -verify

When you are reviewing a multi-cert PEM chain on a locked-down machine without OpenSSL—or want structured cards showing key parameters, Basic Constraints, SANs and a one-click copyable SHA-256 fingerprint—paste the PEM or load the .pem/.crt/.csr file directly into our X.509 / PEM Certificate & CSR Decoder.

Verify live deployment after installation

Once you install the inspected certificate on your web server or CDN, confirm that the live endpoint serves the full chain, redirects http:// to https://, and publishes Strict-Transport-Security and CAA records properly with our SSL/TLS Certificate Checker.