You can download openssl as zip and use it without installation. Zipped openssl doesn't come with openssl config file so I had to use one which I found in my Git folder.

Open cmd.exe as admin and run those lines below. If you will be asked about Common Name (CN) use your website address. You can use wildcard's but bare in mind CN wildcard doesn't work with top-level domain so *.localhost won't work but something like *.localhost.dev will.

openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem -config "C:\Program Files\Git\mingw64\ssl\openssl.cnf"

openssl x509 -text -noout -in certificate.pem

openssl pkcs12 -inkey key.pem -in certificate.pem -export -out certificate.p12

openssl pkcs12 -in certificate.p12 -noout -info

Now you can import certificate.p12 in your IIS and use that certificate in your https bindings.