How to convert a certificate into the appropriate format (2024)

Solution

If your server/device requires a different certificate format other than Base64 encoded X.509, a third party tool such as OpenSSL can be used to convert the certificates into the appropriate format.

For information on OpenSSL please visit:www.openssl.org


Note:OpenSSL is an open source tool that is not provided or supported by Thawte

Get top-of-the-line support tailored to your unique business needs.

Some common conversion commands are listed below:

Note:The PEM format is the most common format used for certificates. Extensions used for PEM certificates are cer, crt, and pem. They are Base64 encoded ASCII files. The DER format is the binary form of the certificate. DER formatted certificates do not contain the "BEGIN CERTIFICATE/END CERTIFICATE" statements. DER formatted certificates most often use the '.der' extension.
Convert x509 to PEM

openssl x509 -in certificatename.cer -outform PEM -out certificatename.pem

Convert PEM to DER

openssl x509 -outform der -in certificatename.pem -out certificatename.der

Convert DER to PEM

openssl x509 -inform der -in certificatename.der -out certificatename.pem

Convert PEM to P7B

Note:
The PKCS#7 or P7B format is stored in Base64 ASCII format and has a file extension of .p7b or .p7c.
A P7B file only contains certificates and chain certificates (Intermediate CAs), not the private key. The most common platforms that support P7B files are Microsoft Windows and Java Tomcat.

openssl crl2pkcs7 -nocrl -certfile certificatename.pem -out certificatename.p7b -certfile CACert.cer

Convert PKCS7 to PEM

openssl pkcs7 -print_certs -in certificatename.p7b -out certificatename.pem

Convert pfx to PEM

Note:
The PKCS#12 or PFX format is a binary format for storing the server certificate, intermediate certificates, and the private key in one encryptable file. PFX files usually have extensions such as .pfx and .p12. PFX files are typically used on Windows machines to import and export certificates and private keys.

openssl pkcs12 -in certificatename.pfx -out certificatename.pem

Convert PFX to PKCS#8

Note:
This requires 2 commands

STEP 1:Convert PFX to PEM

openssl pkcs12 -in certificatename.pfx -nocerts -nodes -out certificatename.pem

STEP 2:Convert PEM to PKCS8

openSSL pkcs8 -in certificatename.pem -topk8 -nocrypt -out certificatename.pk8

Convert P7B to PFX

Note:
This requires 2 commands

STEP 1: Convert P7B to CER

openssl pkcs7 -print_certs -in certificatename.p7b -out certificatename.cer

STEP 2: Convert CER and Private Key to PFX

openssl pkcs12 -export -in certificatename.cer -inkey privateKey.key -out certificatename.pfx -certfile cacert.cer

How to convert a certificate into the appropriate format (2024)

FAQs

How to convert certificate to text format? ›

You don't need to CONVERT the files!
  1. Copy and paste your file (to retain your original file) ie: 35544arrtsfevctdtys767.crt to 35544arrtsfevctdtys767-copy.crt.
  2. Rename your COPIED file (35544arrtsfevctdtys767-copy. crt) to name-of-your- choice. TXT i.e. abc. ...
  3. You now have the TEXT version of your file...
Jan 18, 2018

How do I convert a certificate to CER format? ›

How to Convert Files from CRT to CER
  1. Double-click on the yourwebsite. ...
  2. Click on the Details tab, and then select the Copy to file button.
  3. Click Next in the certificate wizard.
  4. Choose Base-64 encoded X. ...
  5. Now, browse to store your file and type in the filename that you want to keep.
  6. Finally, save the file.

How to convert certificate to der format? ›

To convert a certificate file from PEM to DER format:
  1. Start the console on the local computer.
  2. Go to the folder containing the PEM certificate file and run the following file conversion command: openssl x509 -outform der -in <certificate file name>.pem -out <certificate file name>.der. where: <certificate file name>.

What is certificate file format? ›

Common File Extensions

Certificate. Certificate files: .crt, .cer, .ca-bundle, .p7b, .p7c, .p7s, .pem. Keystore Files: .key, .keystore, .jks.

How do I convert a digital certificate? ›

Export Client Digital Certificate to PKCS#12/. PFX
  1. Open Internet Explorer and click the Tools icon in the top right corner. ...
  2. Click the Content tab. ...
  3. Select your certificate. ...
  4. The Certificate Export Wizard will begin. ...
  5. Click Yes, Export the Private Key.
  6. Save the file in PFX format.
Feb 19, 2024

How do I convert a document to plain text? ›

Methods for Conversion
  1. Open the DOC or DOCX file in Microsoft Word.
  2. Go to the File menu and select Save As .
  3. In the dialog that appears, choose TXT as the desired format from the dropdown list.
  4. Specify the file name and location, then hit the Save button.
Sep 7, 2023

How do I convert a PDF to a certificate? ›

How to generate credentials in PDF using Certifier for free
  1. Step 1: Sign up for Certifier. ...
  2. 2.1 Start a new certificate design. ...
  3. 2.2 Choose your preferred certificate template. ...
  4. 2.3 Customize your chosen certificate template. ...
  5. 2.4 Add a QR code to your certificate. ...
  6. 2.5 Finalize your design. ...
  7. Step 3: Issue and send your certificate.

What is a .PEM file? ›

Privacy Enhanced Mail (PEM) files are a type of Public Key Infrastructure (PKI) file used for keys and certificates. PEM, initially invented to make e-mail secure, is now an Internet security standard.

Are .cer and .crt the same? ›

Despite naming variations, . cer vs . crt files are essentially the same. Check our complete guide on multiple certificate file formats to learn about other file extensions used in SSL installation.

Are .cer and .PEM the same? ›

Note: The PEM format is the most common format used for certificates. Extensions used for PEM certificates are cer, crt, and pem. They are Base64 encoded ASCII files. The DER format is the binary form of the certificate.

What is the Base64 certificate format? ›

Base64 is the industry standard format for SSL certificate content. The most common web servers will generate a certificate signing requests as well as accept SSL certificates in base-64 format. The size of the certificate content will depend on the encryption strength of the certificate.

How do I convert my SSL certificate file to PEM format? ›

How to Convert Your Certificates and Keys to PEM Using OpenSSL
  1. OpenSSL: Convert CRT to PEM: Type the following code into your OpenSSL client: openssl x509 -in cert.crt -out cert.pem.
  2. OpenSSL: Convert CER to PEM. openssl x509 -in cert.cer -out cert.pem.
  3. OpenSSL: Convert DER to PEM. openssl x509 -in cert.der -out cert.pem.

What is certificate conversion? ›

Certificate of Conversion Definition. Certificate of Conversion is a document that officially changes a company's legal structure, such as converting from a sole proprietorship to a corporation or from one business entity type to another, while maintaining its continuous existence.

How to convert cer to P12 format? ›

Convert a CER file to a P12 file
  1. Open the Keychain Access application from the Applications > Utilities folder.
  2. Import the certificate file (CER file) by selecting File > Import and locating your CER file provided by Apple.
  3. Select the Certificates category and locate the certificate that you just imported.

Can I modify a certificate? ›

The certificate reissue process allows you to modify an issued certificate. Some modifications enable you to build upon the original certificate, resulting in two or more versions of that certificate. For example, when reissuing a certificate, you can add domains to the original certificate.

How do I change a PDF certificate? ›

Open the pdfFiller website or app and log in to your account. Upload the certificate document that you want to change by clicking on the 'Upload' button. Once the document is uploaded, click on the 'Edit' button to open it in the pdfFiller editor. Locate the section of the certificate that you want to change.

How to convert .cer to .p12 in Windows? ›

Right-Click on your private Key and select the "export Key" option. Now you can create a . p12 Certificate File, just as the doctor ordered. You should select both cert and private key.

Top Articles
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 6529

Rating: 4.9 / 5 (59 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.