CRT to PEM Converter: Convert Certificates Free
A CRT to PEM converter turns a certificate file into PEM text that servers and tools can read. The extension does not tell you the format: a .crt or .cer file may already be PEM or may be binary DER. Check the content first, then convert with OpenSSL or the browser converter below.
Identify the format first
Open the file in a text editor. If you see -----BEGIN CERTIFICATE-----, it is PEM, whatever the extension is. If it looks like binary gibberish, it is DER or PKCS#12.
head -c 60 certificate.crt
| Format | Typical extensions | Encoding | Holds private key |
|---|---|---|---|
| PEM | .pem, .crt, .cer, .key | Base64 text | In a separate .key file |
| DER | .der, .cer | Binary | No |
| PKCS#7 | .p7b, .p7c | Base64 or binary | No, certificates only |
| PKCS#12 | .pfx, .p12 | Binary, password protected | Yes |
CRT to PEM converter: the commands
DER (.cer or .der) to PEM:
openssl x509 -inform der -in certificate.der -out certificate.pem
PEM to DER:
openssl x509 -in certificate.pem -outform der -out certificate.der
PKCS#7 (.p7b) to PEM:
openssl pkcs7 -print_certs -in bundle.p7b -out bundle.pem
PFX to PEM (certificate and key):
openssl pkcs12 -in certificate.pfx -nodes -out all.pem
The output contains the private key unencrypted, so protect the file. To split a PFX into separate files, use -nokeys for the certificate and -nocerts for the key.
PEM to PFX for Windows or Azure:
openssl pkcs12 -export -out certificate.pfx -inkey private.key -in certificate.crt -certfile ca_bundle.crt
CRT to PEM converter: using the online tool
For certificates and chains, which are public data, the SSL converter does the same conversions in the browser. After converting, you can inspect the result with the SSL decoder to confirm the names, issuer and dates.
Do not upload a private key or a PFX to any website. Convert those locally with OpenSSL.
Check the result
- Confirm the certificate and key still match using the key matching guide.
- Check that the chain is complete, with your certificate first and intermediates after it.
- Test on the live server with the SSL checker.
Which format does my platform want?
| Platform | Format |
|---|---|
| Nginx, Apache, cPanel, HAProxy | PEM (HAProxy wants certificate, chain and key in one PEM file) |
| Windows IIS, Azure App Service, Exchange | PFX |
| Java and Tomcat | PKCS#12 or JKS keystore |
Common mistakes
Renaming a file from .cer to .pem does not convert it. If the content is binary DER, the rename changes nothing and the server still rejects the file. Another trap is the order of certificates in a PEM bundle: your certificate first, then each intermediate. A reversed order causes chain errors on strict clients.
Finally, check line endings and stray spaces when you paste a certificate into a panel. A missing dash in the BEGIN or END line is enough to make the import fail. If a file will not parse, decode it with the SSL decoder to see where it breaks.
Related reading: the full CRT to PEM guide and the PEM to PFX converter.
Frequently Asked Questions
Is CRT the same as PEM?
Often, but not always. CRT is only a file extension. Check the content.
Why will my PFX not open?
It needs the export password. Without it, ask whoever created it or reissue the certificate.
Does converting change the certificate?
No. It changes the encoding only. The signature and contents stay the same.
Where do I get a free certificate to convert?
See Get a Free SSL Certificate and Download It.
Can I convert a .cer file the same way?
Yes. A .cer is usually the same thing as a .crt, so identify the content first and convert the same way.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.