And if for some reason you don't have access to Open SSL, another easy way in Windows is to simply double-click the certificate to open it (assuming it ends in .cer, .crt or .der). Go to the "details" tab and select "copy to file". When copying, you can save as base64-encoded.