I am using Windows and have been given a .cer file. How can I view the details of it?


OpenSSL will allow you to look at it if it is installed on your system.

openssl x509 -in cerfile.cer -noout -text

The format of the .CER file might require that you specify a different encoding format to be explicitly called out.

openssl x509 -inform pem -in cerfile.cer -noout -text


openssl x509 -inform der -in cerfile.cer -noout -text

On Windows systems you can right click the .cer file and select Open. That will then let you view most of the meta data.

On Windows you run Windows certificate manager program using certmgr.msc command in the run window. Then you can import your certificates and view details.

  • 10
    I get "4726:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:632:Expecting: TRUSTED CERTIFICATE" when I do this in Linux – Zubair Dec 23 '10 at 9:51
  • What you mentioned about Windows works though, but is very hard to read the certificate details in the little window that is displayed – Zubair Dec 23 '10 at 9:54
  • 1
    I've added some clarifications on some OpenSSL options to specify different encoding formats - given your error specifying DER format looks like it would work. – Helvick Dec 23 '10 at 10:31
  • 2
    Linux gui version: gcr-viewer. – user3622355 Aug 14 '14 at 4:11
  • 9
    when getting :0906D06C:PEM routines:PEM_read_bio" error, u will need to use the 3rd command given, with -inform der – user289547 May 18 '15 at 10:39

If you're using Windows, you can use console util

certutil -dump <file>

All answers here fail for MacOS. The only thing that works in Sierra and High Sierra is:

openssl x509 -inform der -in cerfile.cer -noout -text
  • 11
    Helvick's answer (last updated in 2014) contains this exact line. – mwfearnley May 18 '18 at 16:18
  • @mwfearnley You are right. However, he put the outdated solution first, the effective solution at last. – DawnSong Aug 20 at 8:54
  • Surely the necessary solution depends on the format of the certificate file, rather than the system it's used on? – mwfearnley Aug 20 at 9:44

You can import and preview it by Powershell:

Get-ChildItem –Path c:\file.cer | Import-Certificate –CertStoreLocation cert:\LocalMachine\My

then view it in Windows certmgr.msc or load directly to Powershell


or by Thumbprint

$cert = (Get-ChildItem –Path cert:\LocalMachine\My\AE53B1272E43C14545A448FB892F7C07A217A761)

Don't forget to IMPORT-MODULE PKI

Or you can also view, export, import, and delete certificates by using Internet Explorer.

To view certificates with Internet Explorer

  1. In Internet Explorer, click Tools, then click Internet Options to display the Internet Options dialog box.
  2. Click the Content tab.

  3. Under Certificates, click Certificates. To view details of any certificate, select the certificate and click View.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.