Convert certificates and private keys between PEM (.pem, .crt, .key), DER (.cer, .der), PFX/P12 and P7B. Drop your files, see what is inside, confirm the key matches the certificate, and download the format your server needs. Everything runs in your browser, so keys never leave your device.
Last updated:
Drop certificate and key files or choose files.pem .crt .cer .der .key .pfx .p12 .p7b .p7c, several at once. Nothing is uploaded.
Contents
Convert to
DER is the binary form of a single certificate or key (Windows often names it .cer). Pick what to save:
P7B (PKCS#7) holds certificates only, never a private key. It is used by Windows, IIS and Java to import a certificate with its chain.
Advertisement
Advertisement
How to use the SSL Certificate Converter
Drop your files: a PFX, or a certificate plus its private key and chain (.crt, .pem, .key, .cer, .p7b). You can also paste PEM text.
Enter the password and click Unlock if the PFX or key is protected.
Check the contents: the certificate should show matches key and the chain should run leaf, intermediate, root.
Pick the output format: PEM for nginx and Apache, PFX/P12 for IIS, Windows and Azure, P7B for Windows or Java chain import, DER for Java and some appliances.
Download the converted file. For a PFX, set an export password first.
Certificate formats at a glance
Format
Extensions
Encoding
Contains
Typical use
PEM
.pem .crt .cer .key .ca-bundle
Base64 text
Certificates, chain and/or key
nginx, Apache, HAProxy, Node.js, Linux tools
DER
.der .cer
Binary
One certificate or one key
Java, Windows certificate import, embedded devices
PFX / P12
.pfx .p12
Binary, password protected
Certificate, chain and private key
IIS, Windows, Azure, Exchange, Java keystores
P7B / PKCS#7
.p7b .p7c
Base64 or binary
Certificates and chain only
Windows and Tomcat chain import, CA downloads
Which file does my server need?
nginx:ssl_certificate points to the full chain (leaf first, then intermediates) and ssl_certificate_key to the PEM key.
Apache 2.4.8+:SSLCertificateFile can hold the leaf plus intermediates; SSLCertificateKeyFile holds the key.
IIS, Windows Server and Azure App Service: import a PFX with the private key and chain.
Tomcat and Java: recent versions use a PKCS#12 keystore directly (a .p12 file with keystoreType="PKCS12").
Cloud load balancers: usually ask for the certificate body, private key and chain as separate PEM fields.
Private key formats
BEGIN PRIVATE KEY is PKCS#8, the modern format for RSA, EC and Ed25519 keys, and the default here. BEGIN RSA PRIVATE KEY (PKCS#1) and BEGIN EC PRIVATE KEY (SEC1) are the older OpenSSL formats still required by some software. BEGIN ENCRYPTED PRIVATE KEY is PKCS#8 protected with a password; this tool encrypts it with PBKDF2-SHA256 (100,000 iterations) and AES-256-CBC. To inspect a certificate's extensions and SANs in detail, use the SSL Certificate Decoder.
Frequently asked questions
What is the difference between PEM, DER, PFX and P7B?
PEM is Base64 text between -----BEGIN----- and -----END----- lines and can hold certificates and keys; .crt, .pem and .key files are usually PEM. DER is the same data in binary, one object per file, often named .cer or .der. PFX (also called P12 or PKCS#12) is a password-protected binary bundle with the certificate, chain and private key. P7B (PKCS#7) holds certificates and the chain but never a private key.
How do I convert a PFX to a CRT and KEY file for nginx or Apache?
Drop the .pfx file, enter its password and click Unlock. In the PEM tab, click Download separate files to get the certificate (.crt), the chain, a full chain and the private key (.key). nginx uses the full chain file for ssl_certificate and the .key for ssl_certificate_key.
How do I create a PFX from a certificate and private key?
Drop the certificate (.crt or .pem), the private key (.key) and optionally the intermediate certificates. Check that the certificate shows matches key, open the PFX / P12 tab, enter an export password and click Create PFX. Choose the 3DES option only if the PFX must import on Windows Server 2016 or older Java versions.
Why does Windows say the PFX password is wrong when it is correct?
Older Windows versions (Windows Server 2016 and earlier, Windows 10 before 1709) cannot read PFX files encrypted with AES, which OpenSSL 3 and this tool use by default. Create the PFX again with the legacy 3DES + SHA-1 option, which those systems support.
Is it safe to convert a private key online?
This converter does all parsing, decryption and encryption in your browser with the Web Crypto API; nothing is sent to a server. The forge library is only downloaded when a file uses legacy 3DES or RC2 encryption. Still, treat private keys carefully and do not leave converted copies on shared computers.
What does 'does not match any certificate' mean?
The public key inside the private key is different from the public key in the certificate, so they do not belong together and a server will refuse to start. Find the key that was generated with the certificate's CSR, or reissue the certificate with a new CSR.
Why is there no private key in my P7B file?
The PKCS#7 format used for .p7b files only carries certificates and CRLs. If your certificate authority sent a P7B, the private key is the one you created with the CSR on your server. Combine the P7B with that key to create a PFX.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.