RSA Key Generator

Generate RSA public/private key pairs
This free online rsa key generator runs in your browser and is part of our Cryptography collection.

🔑 RSA Key Generator

Generate RSA public/private key pairs for asymmetric encryption and digital signatures

Larger keys are more secure but slower to generate

About RSA Keys:

  • Public Key: Can be shared freely, used for encryption and signature verification
  • Private Key: Must be kept secret, used for decryption and signing
  • Key Size: 2048-bit is standard, 4096-bit for maximum security
  • Format: PEM format (Base64-encoded with headers)
  • Use Cases: SSL/TLS certificates, SSH keys, digital signatures, secure communication

⚠️ Security Warning:

  • Private Key Security: Never share your private key with anyone
  • Storage: Store private keys securely with proper file permissions (chmod 600 on Unix)
  • Password Protection: This tool generates unencrypted keys - consider encrypting your private key
  • Production Use: For production systems, use established key management tools
⚡
Instant In-Browser Execution Runs locally in JavaScript without wait times or server delays.
🔒
100% Privacy & Security Your inputs and files are never stored or logged on remote servers.
📱
Cross-Device Responsive Fully optimized for mobile smartphones, tablets, and desktop displays.
🎉
100% Free Forever No subscription fees, no signups, and no software installations.

How to Use the Online RSA Key Generator

1 Select Key Modulus Size

Choose between 2048-bit (industry standard), 3072-bit (high security), or 4096-bit (maximum security) RSA key lengths.

2 Choose Intended Key Usage

Select whether the keypair will be used for "Encryption/Decryption" (RSA-OAEP) or "Digital Signatures" (RSASSA-PKCS1-v1_5 / RSA-PSS).

3 Generate Keypair

Click "Generate Keypair" to compute prime factors and derive the public and private key exponents.

4 Download PEM Files

Copy or download the formatted `-----BEGIN PUBLIC KEY-----` (SPKI) and `-----BEGIN PRIVATE KEY-----` (PKCS#8) PEM files.

Frequently Asked Questions

Common questions about using this free online rsa key generator.

What key size should I choose: 2048 or 4096 bits? ▾
2048-bit RSA keys provide robust security through 2030+ and offer fast computation. 4096-bit keys provide long-term post-quantum resistance buffer, though cryptographic operations take slightly more CPU time.
What is the difference between Public Key and Private Key? ▾
The Public Key can be shared openly with the world (used to encrypt data or verify your signatures). The Private Key must be kept strictly confidential on your machine (used to decrypt messages or sign documents).
In what format are the generated keys exported? ▾
Keys are exported in standard base64 PEM format: SubjectPublicKeyInfo (SPKI) for public keys, and PKCS#8 for private keys, compatible with OpenSSL, SSH, and web servers.
Is it safe to generate RSA keys in a web browser? ▾
Yes, because our implementation uses the browser's native `window.crypto.subtle.generateKey` API backed by operating system entropy. The generated private key never leaves your local browser memory.

More Cryptography

Explore related tools in the same category to solve adjacent tasks faster.

Hash GeneratorGenerate MD5, SHA-1, SHA-256, SHA-512 hashesBcrypt Hash GeneratorGenerate secure bcrypt password hashesCrypto Random GeneratorGenerate cryptographically secure random dataHMAC GeneratorGenerate HMAC signatures for authenticationPBKDF2 Key DerivationDerive cryptographic keys from passwords