PEM to DER / DER to PEM Converter
Convert between ASCII-armored PEM and binary DER.
Free · no sign-up · runs locally·
About this tool
PEM is DER wrapped in Base64 with -----BEGIN/END----- armor lines — the same bytes in a copy-paste-friendly coat. This tool converts in both directions: paste PEM to get DER hex, or paste DER hex to re-armor it with the label of your choice (CERTIFICATE, PUBLIC KEY, PRIVATE KEY…).
Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.
Do the same in a terminal
Reproduce or cross-check this tool with standard command-line utilities. For deterministic operations like hashing and encoding, the output matches exactly.
openssl x509 -in cert.pem -outform der -out cert.der # PEM → DER
openssl x509 -in cert.der -inform der -out cert.pem # DER → PEMFrequently asked questions about PEM ⇄ DER Converter
What's the difference between PEM and DER?+
DER is the raw binary encoding of a certificate or key; PEM is that same DER Base64-encoded and wrapped in -----BEGIN/END----- lines. PEM is copy-paste friendly; DER is compact binary.
Does this work for keys and certificates?+
Yes — any DER/PEM structure: certificates, public keys, private keys, and CSRs. Pick the correct label when converting DER back to PEM.
Is my data uploaded?+
No — conversion happens entirely in your browser.