+/=. Hex ciphertext uses 0-9 and a-f, with two characters per byte. If you upload a binary .enc file, the encoding selector is ignored automatically.1️⃣ What is PEM?
PEM (Privacy-Enhanced Mail) is a text format used to store and transfer keys and certificates. It Base64-encodes binary DER data and wraps it with header and footer lines such as -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----. Common labels include PUBLIC KEY, PRIVATE KEY, and CERTIFICATE. Because it is plain text, PEM is easy to copy, paste, and exchange across systems.
2️⃣ What other formats might you see?
- DER: a raw binary format that stores ASN.1 structures directly and is common in Java or certificate tooling.
- HEX: a hexadecimal string representation of DER bytes, useful for debugging or embedding byte data in code.
- Base64 without headers: the DER payload encoded as Base64 but without PEM wrappers, often used in compact configuration formats.
- PKCS#12 (PFX): a binary container that can package public and private keys together, usually protected with a password.
3️⃣ When should each format be used?
- PEM: the most universal choice for OpenSSL, web servers, API exchange, and manual key handling.
- DER: useful when binary storage is preferred or required by platform-specific tooling.
- HEX: handy for debugging and for situations where byte-level inspection matters.
- Base64 without headers: useful when the surrounding format does not allow PEM wrappers and you want a compact text payload.
- PKCS#12: best when you need to transport a certificate and private key together with password protection.