How to convert SSL Nginx cert to IIS cert

by Daniel Pham
Published: Updated:

This article will guide you how to convert SSL nginx cert to iis cert.

Nginx cert and IIS cert

Just like converting nginx cert to cert tomcat. Nginx uses the ssl format X.509 format, IIS uses the ssl format PFX format.

Recommended Reading: How to convert SSL Nginx cert to Tomcat cert

You need to convert ssl cert from X.509 format to iis so you can use it on IIS web server (running on Windows).

Steps to convert X.509 cert into PFX cert

convert ssl nginx cert to iis cert
Convert SSL nginx cert to iis cert.

In order to successfully convert to .pfx cert, you need 2 files as follows:

  • File server cert: STAR_domain.CERT.crt
  • Private key file: STAR_domain.PRIVATE.key

The file name may differ depending on the cert provider.

Next, run this command to convert X.509 cert to the .pfx cert. It will be easier if you run the command on a Linux machine because it has OpenSSL available.

openssl pkcs12 -export -out domain.pfx -inkey STAR_domain.PRIVATE.key -in STAR_domain.CERT.crt

It will ask you to set an export password. Here, I set it to danie.

Basically, you have finished converting the ssl cert to the .pfx format for the IIS web server.

You can now run the following command to verify the information of the pfx cert.

openssl pkcs12 -info -in domain.pfx


With a simple command, you successfully converted the X.509 ssl cert to the PFX format of the IIS web server. Just a small tip, hope it useful for you.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Notify of
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.



Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 – All rights reserved.

Please write sources “” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Would love your thoughts, please comment.x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.