RSA Key Generator
Generate RSA public and private key pairs online with customizable key sizes (2048, 3072, 4096 bits). Free RSA key generator for encryption, digital signatures, and secure communications.
Public key
Private key
How to Use This RSA Key Generator
- Select the desired key size (1024, 2048, or 4096 bits).
- Click Generate to create a new RSA key pair.
- Copy the public key to share with others for encryption or signature verification.
- Copy the private key and store it securely — never share it.
What is an RSA Key Pair?
RSA (Rivest-Shamir-Adleman) is an asymmetric cryptographic algorithm widely used for secure data transmission. An RSA key pair consists of a public key and a private key. The public key can be shared openly and is used to encrypt data or verify digital signatures. The private key must be kept secret and is used to decrypt data or create digital signatures. The security of RSA relies on the computational difficulty of factoring the product of two large prime numbers.
Recommended Key Sizes
RSA key sizes of 2048 bits or higher are recommended for secure applications. Larger key sizes provide stronger security but require more computational resources to generate and use.
Features
- Generate RSA key pairs in PEM format
- Support for 1024, 2048, and 4096-bit key sizes
- Keys generated entirely in the browser using the Web Crypto API
- One-click copy for both public and private keys
- No server-side processing — your keys stay private
Use Cases
- Generating SSH keys for server authentication
- Creating key pairs for SSL/TLS certificate signing requests
- Encrypting sensitive data for secure transmission
- Signing and verifying digital documents or software packages
- Setting up JWT (JSON Web Token) asymmetric signing
Frequently Asked Questions
What key size should I choose?
Use 2048 bits as a minimum for most applications. Choose 4096 bits for long-term security or highly sensitive data. 1024-bit keys are considered weak and should only be used for testing.
Are the generated keys safe to use in production?
The keys are generated using the Web Crypto API, which provides cryptographically secure random number generation. However, for production systems, consider using dedicated key management tools and hardware security modules.
What is PEM format?
PEM (Privacy-Enhanced Mail) is a Base64-encoded format for storing cryptographic keys and certificates. It uses header and footer lines like '-----BEGIN PUBLIC KEY-----' to identify the content type.