PEM DER
File conversion

Convert PEM to DER

QUICK ANSWER
Is it possible to convert PEM to DER?
Yes - PEM converts to DER.

Run openssl x509 -in cert.pem -outform der -out cert.der for a certificate, or openssl pkey -in key.pem -outform der -out key.der for a private key. PEM and DER hold identical cryptographic data - this is a pure re-encoding.

Also to DER: P7B · CRT · CRL

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert PEM to DER?

Some platforms and tools only accept binary DER files. Java's keytool, older Windows APIs, and certain hardware security modules expect DER. If software rejects your .pem, this conversion is usually the fix.

How to convert PEM to DER

OpenSSL FREE

Run openssl x509 -in cert.pem -outform der -out cert.der for a certificate, or openssl pkey -in key.pem -outform der -out key.der for a private key. OpenSSL is FREE and runs on Windows, macOS, and Linux.

certutil FREE

Open Command Prompt and run certutil -decode cert.pem cert.der to strip the Base64 headers and produce the binary DER file; certutil is built into every Windows installation.

About these formats

Quality & what to watch

  • PEM and DER hold the same ASN.1 cryptographic data - DER is the binary encoding of exactly what PEM stores as Base64; no information is added or removed.
  • A multi-block .pem containing a certificate chain cannot be converted to a single .der - DER holds one object per file; split the blocks first.
  • A DER-encoded certificate is also commonly saved as .cer or .crt - the content is identical regardless of extension.

Frequently asked questions

Is there any information loss when converting PEM to DER?
No - it is a pure re-encoding of the same cryptographic data from Base64 text to binary.
Can I convert a private key from PEM to DER?
Yes, with openssl pkey -in key.pem -outform der -out key.der - but a DER key has no password protection, so keep it as secure as the original PEM.
How do I verify the DER output is correct?
Run openssl x509 -in cert.der -inform der -text -noout; if it prints certificate details, the conversion succeeded.
How do I convert DER back to PEM?
Run openssl x509 -in cert.der -inform der -outform pem -out cert.pem.