PEM ↔ DER Converter

Convert X.509 certificates and keys between PEM (Base64-encoded text with -----BEGIN----- markers) and DER (raw binary). Useful when a tool wants one format and you have the other.

How to use the PEM ↔ DER Converter

PEM → DER: paste the PEM, click Convert, download the resulting binary file. DER → PEM: select the binary file, pick the expected type (CERTIFICATE, PRIVATE KEY, etc.), get the PEM output ready to copy.

About PEM and DER

X.509 certificates and keys come in two encodings of the same underlying ASN.1 data:

  • DER — Distinguished Encoding Rules. Compact binary. Default for Java keystores and Windows.
  • PEM — Privacy Enhanced Mail. Base64 of the DER bytes, wrapped with -----BEGIN X----- / -----END X----- markers. Default for OpenSSL, nginx, Apache, most Linux tools.

They round-trip losslessly — converting PEM to DER and back gives you the same DER bytes, and the same PEM modulo whitespace.