How to convert a PKCS#12 cert into PEM

openssl pkcs12 -in .p12 -out .pem

And if you want to take the password off, add -nodes