RSA Key Generator
Free online RSA key generator. Generate RSA-2048, 3072 or 4096 key pairs in PEM format. Uses Web Crypto API. Public and private keys for encryption and signing. All processing is local and private.
Click "Generate Keys" to create a key pair.
Keep this secret. Never share your private key.
How to Use RSA Key Generator
Choose Key Size
Select the RSA key size — 2048-bit (standard), 3072-bit (high security), or 4096-bit (maximum). Larger keys are more secure but slower to generate and use.
Generate the Key Pair
Click "Generate Keys" to create a new RSA public/private key pair. Generation uses the Web Crypto API and may take a few seconds for larger key sizes.
Copy the Keys
Copy the public key (safe to share) and private key (keep secret). Keys are in PEM format — compatible with OpenSSL, SSH, and most crypto libraries.
Frequently Asked Questions
What is RSA?
RSA (Rivest-Shamir-Adleman) is the most widely used public-key cryptosystem. It generates a key pair: a public key (used for encryption and signature verification) and a private key (used for decryption and signing). RSA security is based on the mathematical difficulty of factoring large prime numbers. RSA-2048 is considered secure through 2030; RSA-4096 offers longer-term protection.
What key size should I use?
RSA-2048 is the minimum and most widely deployed. It meets NIST and FIPS security requirements. RSA-3072 provides additional security margin. RSA-4096 is maximum security but significantly slower — generation can take 20+ seconds. For most applications, RSA-2048 is sufficient. For long-term secrets or compliance requirements, use RSA-3072 or RSA-4096.
Where can I use these keys?
PEM-format keys work with OpenSSL, nginx, Apache, Node.js (crypto module), Python (cryptography), SSH (rsa keys), TLS certificates, JWT signing, and virtually any system that supports RSA. The public key goes in certificates and server configs. The private key stays on your server, encrypted at rest, never shared.