A PEM file is a security certificate file that is used to establish a secure communication channel between a web server and a browser. It is Base64-encoded and may contain a private key, server certificate, and/or a combination of other certificates. PEM files are similar to .der certificate files in terms of usage but is stored as Base64-encoded text rather than binary data. Other similar certificate file formats include .cer and .crt files.
Applications that can open PEM files include text editors such as Microsoft Notepad and Apple TextEdit.
PEM File Format
PEM is a container file format that defines the structure and encoding type of the file used to store the data. PEM files are stored to disc as Base64-encoded file format that is not human-readable. The standard defines that a PEM file starts with:
and ends with:
All other content inside these is base64 encoded (uppercase and lowercase letters, digits, +, and /). A single PEM file can comprise of multiple blocks which can be used by other programs. If a PEM file contains multiple certificates, each certificate is separated by individual blocks as following: