Key Pair Generator
Public / Private Key Pair Tool
Generate RSA and Elliptic Curve key pairs in PEM format directly in your browser.
Keep your private key secret. Never share it or commit it to source control.
About Key Pairs
A key pair consists of a public key and a matching private key used in asymmetric (public-key) cryptography. The public key can be shared freely and is used to encrypt data or to verify signatures, while the private key must be kept secret and is used to decrypt data or to create signatures. This separation is the foundation of TLS, SSH, code signing, and many other security systems.
RSA keys (2048 or 4096 bits) are widely supported and well understood; larger keys are more secure but slower. Elliptic Curve (EC) keys such as P-256 and P-384 offer equivalent security to much larger RSA keys with smaller key sizes and faster operations. Keys here are exported in standard PEM format: public keys use the SPKI structure and private keys use PKCS#8. All generation happens locally with the Web Crypto API, so your keys never leave your device.