.pem.crt.cer.der.key

Certificate files: what they are and how to open them

A certificate file holds a digital certificate, which ties a public key to a website, company or person, and sometimes the private key that goes with it. Drop a PEM file here to read it and see which blocks it holds.

Drop your certificate file here

Opens on this device. Nothing is uploaded. Any other file works too.

What is a certificate file?

A certificate is a small signed document that binds a public key to a name, such as a website’s domain, a company or a person. Browsers check one each time you open an https page, and organizations use them for Wi-Fi, VPNs, signed email and signed software. A certificate authority signs it, so anyone can check it without asking the owner.

The format is X.509, first published by the ITU in 1988 and profiled for the internet in RFC 5280. A certificate is stored either as DER, the raw binary, or as PEM, the same bytes in Base64 text between BEGIN and END lines, a layout inherited from Privacy-Enhanced Mail. The extension does not say which: .crt and .cer files can hold either.

A certificate is public and safe to share. Its private key is not: whoever holds the .key file, or any block labeled PRIVATE KEY, can act as the server or person the certificate names. Never email a key, paste it into a website or upload it to an online decoder. A key that leaks means the certificate must be revoked and replaced.

What is inside

Inside, a certificate is a set of fields encoded in ASN.1: a serial number, the issuer, the dates it is valid between, the subject, the subject’s public key, and extensions such as the domain names it covers and what the key may be used for. The issuer signs all of that, and the signature follows. Apps also show a fingerprint, a hash of the whole certificate, for comparing two copies.

A PEM file can hold several labeled blocks: CERTIFICATE, PRIVATE KEY, ENCRYPTED PRIVATE KEY, CERTIFICATE REQUEST (a .csr sent to an authority) or X509 CRL (a revocation list). A server’s chain file stacks its own certificate and the intermediate ones that link it to a trusted root. A .p12 or .pfx file is different: a password-protected bundle of certificates with their private key, for moving an identity between computers.

One X.509 certificate in PEM form. In DER form the same structure is stored as binary, without the text lines.

How to open a certificate file

Windows

  • Windows certificate viewerBuilt in. Double-click a .crt or .cer to read it on the General, Details and Certification Path tabs.
  • certutilBuilt in. In Command Prompt, certutil -dump name.pem prints the certificate’s fields as text.
  • Universal File Opener for WindowsOursShows each certificate’s fields, steps through a chain file and saves the details as text or the certificate as PEM. Private keys are named, not displayed.

Mac

  • Keychain AccessBuilt in. Double-clicking a .cer, .crt or .p12 file imports it into your keychain, where you can open it to read its fields.
  • openssl in Terminalopenssl x509 -in cert.pem -noout -text prints every field without importing anything. Add -inform DER for a binary file.

iPhone and iPad

  • SettingsA certificate from Mail or Safari installs as a profile; installed profiles are listed in Settings, General, VPN & Device Management. Install only what you expect.

Android

  • SettingsInstalls a certificate, for example for Wi-Fi: Security & privacy, More security settings, Encryption & credentials, Install a certificate. Menu names vary by phone.
  • Universal File OpenerOursShows subject, issuer, validity dates, serial number, key algorithm and fingerprints. Tap a field to copy it, or export the public key as PEM.

In a browser

  • Universal File OpenerOursDrop a PEM file on this page to read its text and see which blocks it holds: certificate, key or request. Nothing is uploaded.

Won’t open?

It opens as binary nonsense in a text editor

It is DER, the binary form, often named .cer or .der. Open it in a certificate viewer instead, or convert it to PEM text (see below).

It holds a private key, not a certificate

The first line says PRIVATE KEY. Keep it secret: do not email it or paste it into an online decoder. The matching certificate is usually a separate .crt or .pem file.

It asks for a password

It is a .p12 or .pfx bundle, or an ENCRYPTED PRIVATE KEY, protected by the password chosen when it was exported. Ask whoever made it; there is no way around it.

It says the certificate is expired or not trusted

Check the validity dates and the certification path. Only the owner can renew an expired certificate. A private or self-signed root shows as untrusted; install it only if your organization tells you to.

Convert a certificate file

  • To PEM, from DERopenssl x509 -inform DER -in cert.cer -out cert.pem. On Windows, open the certificate, choose Details, Copy to File and pick Base-64 encoded X.509 (.CER).
  • To DER, from PEMopenssl x509 -in cert.pem -outform DER -out cert.der, or pick DER encoded binary X.509 (.CER) in the same Windows Copy to File wizard.
  • To a public key fileopenssl x509 -in cert.pem -pubkey -noout prints it as PEM. In our Android app, Export public key PEM saves it as a file.

Certificate files in our apps

Inspect X.509 certificates offline on Android and Windows: subject, issuer, validity, serial number, key algorithm and fingerprints. Android exports the public key as PEM; Windows saves the certificate as PEM. Private keys are identified but not displayed.

Get it on Google PlayGet it from Microsoft Store
All Android tools and limits for certificate files
  • Full X.509 field display for PEM and DER certificates; tap any field to copy it.
  • Export the certificate’s public key as a standard PEM file.
  • PEM private keys and certificate requests are identified but are not shown as certificates.

Limits

  • Inspection only: no key generation, no signing, no importing into Android’s trust store. Use the appropriate certificate tools for those tasks.

Walkthrough: Privacy and offline use on Android