PEM / Private Key Inspector

Inspect a PEM certificate or key — type, algorithm, key size, and expiry.

Ad placeholder (leaderboard)

A PEM file is a Base64 wrapper around binary ASN.1 DER data, bounded by -----BEGIN ...----- and -----END ...----- lines. The same envelope carries X.509 certificates, RSA and EC private keys, and public keys — the label on the first line tells you which. This inspector decodes the Base64 body and walks the DER structure to surface the most useful facts about a key without ever leaving your browser.

How it works

The tool works in three steps:

  1. Detect the type from the BEGIN label (for example RSA PRIVATE KEY, EC PRIVATE KEY, PRIVATE KEY, PUBLIC KEY or CERTIFICATE).
  2. Base64-decode the body into raw DER bytes.
  3. Parse the ASN.1 DER — a tag/length/value tree — to pull out the fields that matter for that type.

For an RSA PRIVATE KEY the structure is SEQUENCE { version, modulus, publicExponent, ... }; the modulus is the first large INTEGER, and counting its significant bits gives the key size. For an EC PRIVATE KEY the named-curve OID identifies the curve (P-256, P-384, P-521). For a CERTIFICATE the tool reaches the validity SEQUENCE inside tbsCertificate to read the not-before and not-after times.

Example

Pasting an RSA 2048 key produces something like:

Type:       RSA PRIVATE KEY (PKCS#1)
Algorithm:  RSA
Key size:   2048 bits

For a certificate you will additionally see the validity window and whether it is currently in date.

Notes

Bit-size is computed by stripping any leading 0x00 sign byte from the modulus INTEGER, then taking (byteLength * 8) adjusted for the top byte’s highest set bit, so a 2048-bit key reports exactly 2048. EC curves are matched by OID; an unknown OID is shown verbatim so you can look it up. Everything runs locally, so you can safely inspect production keys.

Ad placeholder (rectangle)