PEM Certificate Parser Online | X.509 Decoder Browser
Certificates How It Works
openssl verify — this parser decodes individual certificates only.
What Is a PEM Certificate Parser?
A PEM Certificate Parser decodes PEM-encoded (Privacy-Enhanced Mail) cryptographic files by stripping the base64 envelope and parsing the underlying ASN.1/DER structure. It extracts every standard X.509 field — version, serial number, signature algorithm, issuer, validity period, subject, public key algorithm, and fingerprints — so you can inspect certificates, detect expired or deprecated algorithms, and debug ASN.1 structures without installing OpenSSL.
When to Parse a PEM Certificate
- Expiration checking — verify Not Before / Not After dates to ensure a certificate is still valid
- Algorithm audit — detect deprecated SHA-1 signatures or weak RSA key sizes before browsers reject them
- Chain debugging — compare issuer and subject fields across certificate chain files
- Fingerprint verification — cross-check SHA-256 fingerprints against external tools to confirm certificate identity
- DER inspection — export raw DER hex for binary-level ASN.1 structure debugging
X.509 Certificate Fields
| Field | Description | What to check |
|---|---|---|
| Version | v1 (1), v2 (2), or v3 (3) | v3 is standard; v1/v2 lack extensions |
| Serial Number | Unique ID assigned by the CA | Must be non-zero; used for revocation checks |
| Signature Algorithm | How the CA signed the cert | SHA-256+ recommended; SHA-1 deprecated |
| Issuer | The CA that issued the cert | Should match a trusted root or intermediate |
| Validity | Not Before / Not After dates | Current date must fall within this range |
| Subject | The entity the cert belongs to | CN should match your domain |
| Public Key Algorithm | RSA, EC, Ed25519, etc. | RSA 2048+ or EC P-256+ recommended |
| Fingerprints | SHA-1 and SHA-256 hashes | Use SHA-256 for identity verification |
Standards Compliance
- RFC 5280 — Internet X.509 Public Key Infrastructure Certificate and CRL Profile
- RFC 7468 — Textual Encodings of PKIX, PKCS, and CMS Structures (PEM format)
- ASN.1 (X.680/X.690) — Abstract Syntax Notation for DER/BER encoding
- RFC 2986 — PKCS #10: Certification Request Syntax (for CSR parsing)
Last updated:
Code Examples
OpenSSL — Decode Certificate
# Decode certificate with full text output
openssl x509 -in cert.pem -text -noout
# Check expiration date only
openssl x509 -in cert.pem -noout -enddate
# Verify certificate against a CA bundle
openssl verify -CAfile ca-bundle.crt cert.pem OpenSSL — DER and Fingerprint
# Extract DER hex from PEM
openssl x509 -in cert.pem -outform DER | xxd -p
# Parse ASN.1 structure
openssl asn1parse -in cert.pem
# Get SHA-256 fingerprint
openssl x509 -in cert.pem -noout -fingerprint -sha256 Python — X.509 Certificate Parsing
from cryptography import x509
from cryptography.hazmat.primitives import hashes
with open("cert.pem", "rb") as f:
cert = x509.load_pem_x509_certificate(f.read())
print(f"Subject: {cert.subject.rfc4514_string()}")
print(f"Issuer: {cert.issuer.rfc4514_string()}")
print(f"Serial: {cert.serial_number}")
print(f"Valid: {cert.not_valid_before_utc} to {cert.not_valid_after_utc}")
print(f"Sig Algo: {cert.signature_algorithm_oid._name}")
print(f"SHA-256: {cert.fingerprint(hashes.SHA256()).hex(':')}") Go — Certificate Parsing
package main
import (
"crypto/x509"
"encoding/pem"
"fmt"
"os"
)
func main() {
data, _ := os.ReadFile("cert.pem")
block, _ := pem.Decode(data)
cert, err := x509.ParseCertificate(block.Bytes)
if err != nil {
fmt.Println("Parse error:", err)
return
}
fmt.Println("Subject:", cert.Subject.CommonName)
fmt.Println("Issuer: ", cert.Issuer.CommonName)
fmt.Println("Serial: ", cert.SerialNumber)
fmt.Println("Valid: ", cert.NotBefore, "to", cert.NotAfter)
fmt.Println("SigAlg: ", cert.SignatureAlgorithm)
} Rust — X.509 Parsing with x509-parser
// Cargo: x509-parser = "0.16", pem = "3"
use std::fs;
use x509_parser::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let data = fs::read("cert.pem")?;
let pem = pem::parse(&data)?;
let (_, cert) = X509Certificate::from_der(pem.contents())?;
println!("Subject: {}", cert.subject());
println!("Issuer: {}", cert.issuer());
println!("Serial: {:?}", cert.raw_serial());
println!("Valid: {} to {}",
cert.validity().not_before, cert.validity().not_after);
println!("SigAlg: {}", cert.signature_algorithm.algorithm);
Ok(())
} Node.js — X509Certificate API
const { X509Certificate } = require('crypto');
const fs = require('fs');
const pem = fs.readFileSync('cert.pem', 'utf8');
const cert = new X509Certificate(pem);
console.log('Subject:', cert.subject);
console.log('Issuer: ', cert.issuer);
console.log('Serial: ', cert.serialNumber);
console.log('Valid from:', cert.validFrom);
console.log('Valid to: ', cert.validTo);
console.log('Key Algo: ', cert.publicKey.asymmetricKeyType);
console.log('SHA-256: ', cert.fingerprint256); Common Pitfalls
Ignoring SHA-1 deprecation
If the parser shows sha1WithRSAEncryption, the certificate must be reissued immediately. All major browsers (Chrome, Firefox, Safari, Edge) have rejected SHA-1 signed certificates since 2017. Use SHA-256 or stronger.
Not checking the full chain
This parser decodes individual certificates. A valid leaf certificate is useless without a trusted chain to a root CA. Always verify the full chain with openssl verify -CAfile chain.pem cert.pem.
Confusing PEM with DER
PEM is base64-encoded with headers (BEGIN CERTIFICATE). DER is raw binary. If parsing fails, check that the input is actually PEM — use file cert.pem to verify, or try openssl x509 -inform DER.
RSA keys below 2048 bits
RSA 1024-bit keys have been considered insecure since 2013. The parser shows the key size — if it's below 2048 bits, the certificate must be reissued with a stronger key immediately.
Trusting fingerprints without verification
The SHA-256 fingerprint shown by the parser should be cross-checked with openssl x509 -fingerprint -sha256 to confirm the certificate hasn't been tampered with in transit.
Security Notes
100% client-side parsing
All parsing runs in your browser using pure TypeScript with zero external dependencies. No certificate data, private keys, or fingerprints are ever uploaded, logged, or transmitted. The tool works fully offline once cached.
ASN.1 parser from scratch
The ASN.1/DER decoder is implemented from scratch — no forge, asn1.js, or other libraries. This minimizes supply-chain attack surface and ensures full transparency of the parsing logic.
SHA-256 fingerprints for identity
Always use the SHA-256 fingerprint (not SHA-1) to verify certificate identity. SHA-1 has known collision attacks and is no longer considered secure for fingerprinting.
v3 extensions required
Modern TLS certificates must be X.509 v3 to include SAN (Subject Alternative Name) extensions. v1 and v2 certificates lack these and will be rejected by browsers even if otherwise valid.
Disclaimer
This PEM Certificate Parser tool is provided "as is" for educational and debugging purposes. While all parsing runs locally in your browser, you should independently verify certificate details with OpenSSL or another trusted tool before making security decisions. This parser does not perform chain validation or revocation checking.
Further Reading
- RFC 5280 — X.509 Public Key Infrastructure Certificate and CRL Profile
- RFC 7468 — Textual Encodings of PKIX, PKCS, and CMS Structures
- OpenSSL X.509 Command Reference
- Let's Encrypt Documentation
- Common OpenSSL Commands Reference
Related Concepts
- How TLS/SSL Works
- Certificate Signing Requests
- Cryptographic Key Management
- RSA 2048 Encryption
- Elliptic Curve Cryptography
Related Tools
- PEM Format Converter — convert keys between PKCS#1 and PKCS#8 formats
- CSR Generator — generate certificate signing requests with fresh key pairs
- RSA Key Generator — generate RSA key pairs from scratch
- ECC Key Generator — generate and convert elliptic curve keys
Frequently Asked Questions
What information can be extracted from an X.509 certificate?
The parser extracts all standard X.509 fields: version (v1/v2/v3), serial number (unique identifier assigned by the CA), signature algorithm (e.g., sha256WithRSAEncryption), issuer (the CA that signed the certificate), validity period (Not Before and Not After dates), subject (the entity the certificate belongs to), public key algorithm (RSA, EC, etc.), and the certificate's SHA-1 and SHA-256 fingerprints for verification.
What PEM formats and key types are supported?
The parser handles X.509 certificates (BEGIN CERTIFICATE), PKCS#8 private keys (BEGIN PRIVATE KEY), SPKI public keys (BEGIN PUBLIC KEY), and RSA keys (BEGIN RSA PRIVATE KEY or BEGIN RSA PUBLIC KEY). Both PEM-encoded certificates and keys can be parsed. The ASN.1/DER decoder is implemented from scratch in pure TypeScript with no external dependencies.
Does this tool upload my certificate or key?
No. All parsing happens locally in your browser using JavaScript. Your certificate data, private keys, and fingerprints are never sent to any server. The tool works fully offline once the page is cached.
How do I check if my certificate is expired?
After pasting your certificate, look for the "Not Before" and "Not After" fields in the parsed output. The "Not After" date indicates when the certificate expires. If today's date is after the "Not After" date, the certificate has expired and needs to be renewed.
What should I do if the signature algorithm is SHA-1?
SHA-1 signatures are deprecated and rejected by modern browsers. If the parser shows sha1WithRSAEncryption, you need to reissue the certificate with SHA-256 or stronger. Most CAs (Let's Encrypt, DigiCert, Cloudflare) default to SHA-256. The SHA-256 fingerprint shown by the parser can be used to verify certificate identity with external tools.
Privacy: This tool runs entirely in your browser — nothing is uploaded or stored. · Disclaimer: For educational purposes only. Not professional security advice.
More in Certificates
CSR Generator
Generate CSR (Certificate Signing Request) online for SSL/TLS certificates. RSA 2048-4096 & ECDSA, SAN support, signature verification.
PEM Format Converter
Convert RSA keys between PKCS#1 and PKCS#8 formats online. Analyze X.509 certificates, export DER hex, detect key type and algorithm.