Reading an SSL certificate chain from browser error to reviewable record

Open Tool SSL Certificate Parser

Reading an SSL certificate chain from browser error to reviewable record

First, the conclusion

When a browser throws a certificate error, do not replace the certificate immediately. Pull the chain apart and confirm three things: the leaf certificate covers the current hostname, the intermediate certificate is present, and both the leaf and the intermediate are still valid. Many "invalid certificate" reports are just a missing intermediate or a chain that starts with the root.

This page is a structural inspector, not a public trust validator. It turns PEM into readable fields, calculates remaining days, checks whether each issuer matches the next subject, and matches a hostname against SAN. It does not impersonate a browser and does not complete a TLS handshake.

Certificate input area and the parsed chain overview

When it is useful

  • After renewal, confirm the new SAN still covers the main domain, www and mobile hosts.
  • Before deployment, check chain order and avoid shipping leaf and root in reverse.
  • During handover, export subject, fingerprint and validity as a readable record.
  • Diagnose "incomplete chain" or "expired certificate" warnings.

It is not for public trust-store decisions, OCSP/CRL revocation or a real TLS handshake. It verifies signatures inside the supplied chain, but whether the client trusts the anchor still has to be confirmed in the target environment.

Parameters

The textarea accepts PEM blocks with BEGIN CERTIFICATE, or a single DER file. The limit is 20 certificates and 512 KB. More than that is rejected rather than silently truncated. Multiple files are merged and sorted by issuer relationship before display.

The target hostname is only used for matching; no request is sent. Enter example.com and the page checks DNS and IP entries in SAN. *.example.com matches one label: a.example.com yes, example.com and a.b.example.com no.

Reorder is for a mixed-up chain. It prefers a non-self-signed certificate whose issuer is found in another certificate's subject, then links issuer to subject. If the last certificate is not a self-signed root, the page warns that the trust anchor is outside the input. That is not necessarily an error; it only describes the input scope.

Steps

  1. Open the plugin and confirm the certificate field is empty; use “Load sample chain” only when you want a demo.
  2. Paste the PEM chain with the leaf first and intermediates after it; choose a local key file only if you need key pairing.
  3. Optionally enter the target hostname, then click “Parse certificate” and wait for checks, the matrix and the readiness score.
  4. Review the seven checks and deductions, then export JSON, matrix CSV, PEM chain or a Markdown report as needed.

Click Load Sample Chain. The textarea receives two certificates: a leaf for example.com and a self-signed ToolCMS Demo Root CA. Click Parse Certificate. The overview shows two certificates, 1095 days left on the leaf, RSA 2048 and SHA-256 with RSA. The first chain row is the leaf; the second is the root.

Seven checks appear: parsed, leaf validity, chain order, hostname, key strength, signature algorithm and in-chain signature verification. Verification uses the next certificate key on the previous certificate and treats the root as self-signed. It proves the cryptographic relationship inside the supplied chain, not public trust or revocation. With no structural risk, a green note appears, but it never claims the browser will pass.

Chain overview, six self-checks and certificate details

Example one: a hostname mismatch

Change the target hostname to api.example.com and parse again. The SAN contains example.com, www.example.com and 203.0.113.10, so the page reports that the hostname is not in SAN and adds a red risk.

Do not edit the CN to "make it pass". Either issue a certificate for api.example.com or confirm that another certificate should cover it. A wildcard only covers one label; *.example.com does not cover api.staging.example.com.

If the hostname is blank, the check is skipped rather than reported as a pass. That avoids a false all-green result when no target was supplied.

Example two: a broken chain

Paste the root first and the leaf second. Both certificates still parse, but the chain-order check reports that the issuer does not match the next subject. Click Reorder and the leaf returns to the first position.

If the chain is still broken after reordering, an intermediate is usually missing. The page does not invent an intermediate or treat the root as one. Download the intermediate from the CA and parse again.

Whether to serve the root depends on the client trust store and audience. The page does not decide; it only reports whether the root is in the input and whether the last certificate is self-signed.

Output

Start with the four overview numbers: certificate count, leaf days left, public key and signature algorithm. Fewer than 30 days turns amber, expired turns red. RSA below 2048, EC below 256, SHA-1 or MD5 are added to risks.

Subject and Issuer are the core of chain reading. AIA, CRL, certificate policies and SCT are listed too: AIA exposes OCSP/CA Issuers URLs, CRL exposes revocation list URLs, and SCT counts Certificate Transparency signatures. They are display-only and are not fetched automatically. CN is a display name; hostname matching uses SAN. Serial is for comparison with the CA portal. SKI and AKI confirm parent-child links. SHA-1 and SHA-256 fingerprints are for comparing files.

Key Usage and EKU are not decoration. A server certificate normally needs digitalSignature and keyEncipherment for RSA, plus serverAuth in EKU. A CA needs keyCertSign. A CA flag without keyCertSign is reported as a risk.

FAQ

"A root is in the file, so the chain is complete" is false. The root may not be served, and the client may not trust this self-signed root anyway. The page only sees the input.

"A SHA-1 fingerprint is present, so the certificate is fine" is false. A fingerprint is a file digest, separate from validity and signature algorithm. Public TLS should not use SHA-1 signatures.

"The chain order is correct, so the browser must pass" is false. In-chain signatures are verified, but the public trust store, revocation, SNI, system clock and server configuration are still outside this page. A green result only covers structure and signatures in the supplied chain.

Performance and concurrency

Parsing is a local JavaScript DER walk. Nothing is uploaded or queued on a server. Two sample certificates complete instantly in local Chromium. The 20-certificate cap protects the page from accidental large pastes. Fingerprints use WebCrypto asynchronously and do not block the chain rendering.

With many certificates, the page computes SHA-1 and SHA-256 in input order before rendering. There is no network concurrency limit because this is local CPU work. The usual bottleneck is a large unrelated text block, not the parser.

Security and privacy

Certificates are public, but they can still contain internal hostnames, email addresses and organisation names. The page makes no network request, writes no localStorage and sends nothing to a third party. Copy Summary contains subject, dates, key, signature and fingerprint, not private keys.

Never paste a private key here. The page does not parse private keys, and they do not belong in a ticket or chat log. If a certificate contains internal hostnames, check the recipient's access before exporting.

Pre-deployment checks

The generated openssl commands can run on the server:

openssl x509 -in cert.pem -noout -text -fingerprint -sha256
openssl verify -CAfile chain.pem cert.pem
openssl s_client -connect example.com:443 -servername example.com </dev/null

The first checks fields and fingerprint, the second checks the chain, the third sees what the server actually serves. Only the third proves a real client can establish TLS; the page cannot replace it.

Reorder, hostname matching and export area

Limits

No signature verification, no OCSP or CRL, no public trust-store lookup, no private-key reading and no ACME issuance. The limit is 20 certificates. A missing root is reported but not filled in. The result is a reviewable starting point; production still needs a TLS handshake and client compatibility test.

Practical checklist

Record the old SAN, fingerprint and expiry before renewal. After renewal, parse the new chain and confirm the SAN did not shrink, the order is correct and every entry hostname is covered. Put both fingerprints in the change record so a wrong file is easy to spot.

For a multi-host site, test each hostname separately. Mobile, API and static hosts may have different certificates. Enter each in the target field and parse once; gaps show up early.

Behind a CDN, origin and edge certificates are different. The page inspects the file you paste; the edge certificate must be checked in the CDN console or with a real handshake. Both must be valid.

Old clients may not support EC, Ed25519 or TLS 1.3. Match the algorithm to the audience. Public sites often keep RSA 2048 as a compatibility fallback.

A long chain increases handshake size. The page does not measure it, but extra roots or cross-certificates can cause timeouts on some devices. Follow the CA guidance rather than piling on files.

SNI is essential when multiple certificates share one IP. The page does not test SNI. Confirm the server returns the right certificate for each hostname, or the browser will see a different one.

Error dictionary

ERR_CERT_AUTHORITY_INVALID often means a missing intermediate, a self-signed certificate or an untrusted root. Fix the chain first.

ERR_CERT_COMMON_NAME_INVALID means a hostname mismatch. Check SAN coverage and whether the wildcard is one label only.

ERR_CERT_DATE_INVALID means expired or not yet valid. Check system time, validity and timezone; do not hide it by changing the clock.

ERR_SSL_VERSION_OR_CIPHER_MISMATCH is usually a protocol or cipher problem, not a certificate field. Use a TLS configuration check, not this parser.

1.2.0 addendum: private-key pairing and PEM export

A wrong certificate or a key that does not match the certificate is a common cause of a post-deploy handshake failure. This version accepts a PEM private-key file and compares it with the leaf public key in the browser. It supports PKCS#8, RSA PKCS#1 and SEC1 EC with an embedded public key. The key is read into memory only; it is never uploaded or written to localStorage. With a key loaded, the self-check count rises from seven to eight.

A new Export PEM Chain button writes the current order as standard PEM for openssl verify or a server configuration. Encrypted keys must be decrypted first; Ed448, unknown curves or unsupported browser algorithms degrade to a clear skip rather than a fake pass.

New in 1.3.0: SPKI pin and renewal comparison

After parsing, the detail view adds an SPKI Pin row (sha256/ prefix, Base64 without padding). It is the SHA-256 of the public key, not the certificate fingerprint: if the key survives renewal, the pin can stay in place.

Paste the new certificate into the renewal card and select “Compare certificates”. The result lists subject, issuer, serial, added and removed SANs, validity delta in days, key type and size, signature algorithm and whether the SPKI pin changed. A removed SAN is flagged; a changed pin tells you to update the backup pin. The JSON comparison field and the Markdown renewal section are ready for a change ticket.

New in 1.4.0: chain health matrix

After parsing, the right column renders a per-certificate matrix: role (leaf, intermediate, root), validity, days left, key, signature algorithm, CA flag, SAN count and the first 16 characters of SHA-256. Use it to review the whole chain before a renewal or migration instead of opening each detail row.

“Download matrix CSV” exports 14 columns for a change ticket. The matrix is a structural summary; trust-store acceptance and revocation still require openssl verify and a real handshake in the target environment.

New in 1.5.0: deployment readiness score

A fixed 100-point deployment readiness score is added after parsing: chain 30, validity 15, hostname 15, key 16, signature 7, SAN 7, SCT 5 and usage 5. When hostname or usage is blank the score normalises over the filled items instead of treating missing input as a failure. Hostname matching supports exact and single-level wildcard labels; a key that does not match the certificate loses points.

The score reports A/B/C/D with a reason for every deduction. Treat B or lower as “fix before deploy”. It reflects the current PEM and inputs only and does not replace a real handshake, OCSP or trust-store validation.

1.5.1: empty by default

The plugin opens with no injected sample input and no automatic parsing; certificate, domain, query and site fields are blank. Use “Load sample” manually to explore; the sample only fills the current page and is not stored as platform default data.

⏫︎