PEM format
What is PEM format?
PEM (Privacy-Enhanced Mail) format is the base64 text container -- BEGIN/END headers -- that most TLS certificates and keys are stored in, standardized for that reuse by RFC 7468. AdminKit's SSL check tool reads the certificate chain a server presents, typically distributed to it in PEM form.
By AdminKit team, Netbase JSC · Updated
PEM (Privacy-Enhanced Mail) format is the base64-encoded text container most TLS certificates, keys, and certificate signing requests are stored and exchanged in, wrapped between a “-----BEGIN …-----” and “-----END …-----” header naming the content type. The name comes from RFC 1421, an early-1990s standard for encrypting email that never saw wide adoption for its original purpose, but its text-safe encoding of binary cryptographic data was reused so widely for certificates and keys that RFC 7468 — also tracked on its IETF Datatracker page — later formalized that reuse as its own specification, independent of email. The alternative is DER, the same underlying binary ASN.1 data PEM encodes, without the base64 and header wrapping; a file ending in .pem or .crt is usually PEM-encoded and readable as plain text, while a .der file is raw binary and can’t simply be opened in a text editor. AWS Certificate Manager’s own import documentation requires exactly this format, showing a certificate wrapped between -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines. OpenSSL’s format-options documentation defines PEM the same way, as a block of base64 encoding marked by BEGIN and END lines, and notes that since OpenSSL 3.0 its commands can read keys, single certificates and CRLs in DER, PEM or PKCS#12 form without being told which. A CSR, an X.509 certificate, and a private key are all commonly distributed in PEM form, often concatenated in the same file for a full chain.
PEM format is part of AdminKit’s machine protocols cluster; the full AdminKit glossary lists other related terms.
Frequently asked questions
What does a PEM file actually contain?
Base64-encoded binary data -- a certificate, key, or signing request -- wrapped between a "-----BEGIN ...-----" and "-----END ...-----" header naming the content type.
Where does the name PEM come from?
RFC 1421, an early-1990s standard for encrypting email that never saw wide adoption for its original purpose; its text-safe encoding was later reused for certificates and keys.
What formalized PEM's reuse for certificates, independent of email?
RFC 7468.
What's the difference between PEM and DER?
DER is the same underlying binary ASN.1 data PEM encodes, without the base64 and header wrapping -- a .pem file is plain text, a .der file is raw binary.