Knowledge

How to extract the certificate from a PFX file

#Security

Sometimes you receive a PFX file, which is a file that bundles both certificate and private key of a SSL certificate. Here's how to extract the certificate.

Published by Mark van Eijk on August 10, 2022 · 1 minute read

For this we need the openssl command line tool. Using the following command you can extract the certificate from a PFX file:

openssl pkcs12 -in pfx-file.pfx -nokeys -out certificate-file.pem

Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

Related articles

How to extract private key from PFX file

Sometimes you receive a PFX file, which is a file that bundles both certificate and private key of a SSL certificate. Here's how to extract the certificate.

Read more →