Guides
Choose a certificate or key file format
Check the destination's required format first, and distinguish an issued certificate, a certificate request, and a private key.
Which format should you choose?
Choose by the role each file plays in your workflow.
- Text-encoded certificate or key → PEM
- Issued certificate file → CRT or CER
- Binary-encoded certificate → DER
- Container with certificate and private key → PFX or P12
- Request to a certificate authority → CSR
Do not judge by extension alone
CRT and CER are extensions commonly used for certificates; PEM and DER describe encoding. Check the file's contents, the destination's requirements, and whether a certificate chain is present.
Keep private keys private
PFX/P12 files and some PEM files can contain a private key. Keep them out of public repositories, web directories, chats, and email attachments; apply secure storage and access controls.
Formats to consider
PEM
Good for: Deploying certificates or keys where PEM is required
Less suitable for: Publishing or sharing without inspecting contents
CRT
Good for: Deploying an issued X.509 certificate where requested
Less suitable for: Using it in place of a private key
DER
Good for: Deploying a certificate where DER encoding is required
Less suitable for: Editing as plain text
PFX
Good for: Moving certificates and private keys where PKCS#12 is required
Less suitable for: Storing in a public location
CSR
Good for: Requesting a certificate from a certificate authority
Less suitable for: Deploying as though it were an issued certificate
Before you export
- Do not publish or share files that may contain private keys.
- Check expiry, subject names, certificate chain, and destination requirements.