RSA Key Pair Generator
Generate RSA public and private key pairs.
How to Use
Select the desired key size (2048, 3072, or 4096 bits) and click Generate to create a new RSA key pair. The tool produces both the public key and private key in PEM format. You can copy each key separately or download them as files.
Common Use Cases
- Generating RSA key pairs for SSH access to servers and Git repositories
- Creating keys for JWT RS256 token signing in authentication systems
- Producing test key pairs for development and staging environments
- Generating keys for encrypting sensitive configuration values
Frequently Asked Questions
What key size should I use?
2048-bit keys are the current minimum for security. 4096-bit keys offer more future-proofing but are slower to generate and use. For most applications, 2048 or 3072 bits is sufficient.
Is it safe to generate RSA keys in a browser?
The keys are generated locally using the Web Crypto API and never leave your browser. However, for production use, generating keys on a secure server or using a hardware security module (HSM) is recommended.
What is PEM format?
PEM (Privacy Enhanced Mail) is a Base64-encoded format with header and footer lines like "-----BEGIN PUBLIC KEY-----". It is the most common format for storing and exchanging cryptographic keys and certificates.