PEM Generator
Generate PEM formatted keys instantly in your browser. No servers, no cloud, your keys never leave your device
What is PEM?
Privacy-Enhanced Mail (PEM) is a base64-encoded container format for storing and transmitting cryptographic keys, certificates, and other data. Though originally for email, it’s now a de facto standard for various security protocols like TLS/SSL. PEM files are easily readable by humans and can be opened in a simple text editor.
A PEM file is a text file that includes a header and footer that specify the type of data it contains. Here is an example of an RSA private key in PEM format:
-----BEGIN PRIVATE KEY-----MIIEvgIBADANBgkqhgEAAfsdgADANBgkfnhdcafscoIBAQDc...... (base64 encoded data) ...-----END PRIVATE KEY-----
Let’s break down the structure:
How PEM files are used
PEM files are widely used in web servers for SSL/TLS certificates. A web server might be configured with a PEM file containing the server's private key and another with the public certificate chain. Browsers use the public certificate to verify the server's identity. PEM is also used for SSH keys, code signing, and more. The generator on this page creates a key pair: a private key (which you should keep secret) and a public key (which you can share).
Try it yourself
Use the generator above to create secure PEM-formatted key pairs directly in your browser. No server side processing, everything happens on your device for maximum security. You can generate RSA, EC, or EdDSA keys with desired customization and export them in PEM format.