Certificate Converter (PEM ⇄ DER)

Security Client-side certificate ssl tls x509 pem der crt cer converter

This tool runs entirely client-side, in your browser: your data is never sent anywhere.

What it does

Converts an X.509 certificate between its two most common textual/binary encodings:

Everything happens entirely in your browser — the certificate content is never sent anywhere. This is useful when you need to quickly convert a certificate a CA or tool gave you into the format another system expects (some Java keystores, older Windows tools, or embedded devices expect DER, while almost everything else — Apache, Nginx, most CAs — expects PEM).

Try it

How it works

  1. PEM → DER: the tool strips the -----BEGIN/END CERTIFICATE----- header/footer lines and whitespace, then Base64-decodes the remaining text into raw bytes. Those bytes are the DER encoding — PEM is simply "DER, Base64-encoded, with a header/footer and 64-column wrapping."
  2. DER → PEM: the raw bytes (or hex string) are Base64-encoded, split into 64-character lines, and wrapped with the standard -----BEGIN CERTIFICATE----- / -----END CERTIFICATE----- markers.
  3. Certificate details: the tool performs a minimal ASN.1 DER parse (entirely in JavaScript) to extract commonly-needed fields — Subject, Issuer, Validity dates, Serial Number, Signature Algorithm, and Public Key Algorithm — without needing any external crypto library.
  4. File uploads are read with the FileReader API; .der/.cer binary files are read as ArrayBuffer and hex-encoded automatically, while .pem/.crt/.txt files are read as text.

Format cheat sheet

ExtensionTypical encodingNotes
.pemPEM (Base64 text)Most common, human-readable, used by Apache/Nginx/most CAs
.crtUsually PEM, sometimes DERAmbiguous — check the file content
.cerUsually DER, sometimes PEMCommon on Windows/Java
.derDER (binary)Unambiguous — always binary
.p7b / .p7cPKCS#7 (not supported here)Container format, can hold a chain
.pfx / .p12PKCS#12 (not supported here)Contains cert and private key, password-protected

Notes & limitations