Private key caution
Be especially careful if the file you convert contains a private key (PRIVATE KEY). This tool processes files and text only inside your browser and never sends them to a server, but uploading a real production private key to a site you do not trust is a risky habit. Do conversions that need the key with openssl on the server, and use this tool for certificates, chains and CSRs. A warning appears whenever a key is mixed in; clear the input after use.
How to use
- Paste PEM text (or a base64 string of DER) into the box, or drop a
.crt,.cer,.pem,.deror.p7bfile. The format is detected automatically. - Under “Convert to” choose PEM, DER, Base64 (one line), P7B (PEM) or P7B (DER).
- Copy the result or download everything as one file. With several certificates you can download them one by one from the table, or all together as a ZIP.
- If a chain file is in the wrong order, turn on “Order from server certificate to root”.
Formats at a glance
| Format | What it looks like | Common extensions |
|---|---|---|
| PEM | base64 text starting with -----BEGIN CERTIFICATE-----; several can be concatenated |
.pem .crt .cer .key |
| DER | The same data as raw binary, one object per file | .der .cer |
| Base64 (one line) | DER written as a single base64 string (no BEGIN line, no line breaks) | .txt |
| P7B (PKCS#7) | A bundle holding several certificates, never a private key | .p7b .p7c |
The .crt and .cer extensions may hold either PEM or DER. Open the file in a text editor: if it starts with BEGIN it is PEM, and if you see garbled characters it is DER. This tool tells them apart for you.
Splitting and merging bundles
Drop a file like fullchain.pem and each certificate is listed separately, ready to download as its own file with the CN in the file name. In the other direction, paste the server certificate followed by its intermediates and download PEM to get one bundle. In nginx, ssl_certificate should list the server certificate first and then intermediates; the root normally can be left out. Use the SSL certificate viewer to inspect each certificate.
What is not supported
- PFX/P12 (PKCS#12): these contain a password-encrypted private key and are not handled here. On the server run
openssl pkcs12 -in file.pfx -nodes -out all.pemand use the PEM. To build one, useopenssl pkcs12 -export -inkey private.key -in cert.pem -out file.pfx. - Legacy encrypted keys (
Proc-Type: 4,ENCRYPTED): re-encoding them is meaningless, so they are skipped. Decrypt them first. - Input larger than 5 MB is rejected.
FAQ
How do I convert a crt file to pem?
If the .crt already contains PEM text, renaming it to .pem is enough. If it is DER binary, drop it on this tool, choose “PEM” and download. On the command line: openssl x509 -inform der -in cert.cer -out cert.pem.
How do I extract certificates from a P7B file?
Drop the P7B file or paste the BEGIN PKCS7 text and every certificate inside is listed. Choose “PEM” to get one bundle. You can also go the other way and pack several PEM certificates into a P7B; the result has the same structure as openssl crl2pkcs7 -nocrl -certfile chain.pem.
How is DER different from one-line base64?
DER is a binary file; one-line base64 is the same bytes written as text. It is handy for putting a certificate in an email, a config file or JSON. For generic base64 conversion use the Base64 encoder and decoder.
How do I split a bundle?
Paste or drop the bundle, then use “Download” on each row, or “Download every block (ZIP)” to get them all in one archive.
Does converting change the certificate?
No. Only the encoding changes, the underlying bytes stay the same, so the SHA-256 fingerprint is identical. To confirm two files are the same certificate, compare fingerprints in the SSL certificate viewer.
Certificates and files you provide are processed only in your browser and never sent to a server.