RSA Key Generator

Generate RSA key pairs — 2048/4096 bit PEM export

🔒 Files never leave your browser
Keys are generated entirely in your browser using the Web Crypto API. Nothing is sent to any server.

How to Use RSA Key Generator

Select size

Choose 2048 or 4096 bit modulus.

Generate

Click generate to create the key pair.

Copy keys

Copy public and private keys in PEM format.

Why Choose AllTools RSA Key Generator?

  • 100% free, no account needed
  • 2048 and 4096 bit keys
  • PEM format export
  • Web Crypto API
  • Generation time shown
  • No data stored or transmitted

Why Use This Tool

  • All processing happens locally — passwords and keys never leave your device
  • No data stored or transmitted to any server
  • Completely free with no usage limits
  • No account or registration required
  • Uses industry-standard cryptographic algorithms

Understanding RSA Key Pairs

RSA (Rivest-Shamir-Adleman) is an asymmetric encryption algorithm that uses two mathematically linked keys: a public key for encrypting data and a private key for decrypting it. The security relies on the difficulty of factoring large prime numbers — a 2048-bit RSA key represents a number with 617 digits, and factoring it with current technology would take millions of years. Key sizes directly affect security: 1024-bit keys are considered insecure (theoretically factorable with significant resources), 2048-bit keys are the current standard for most applications, and 4096-bit keys provide extra margin for high-security or long-term needs. The trade-off is performance — 4096-bit operations are about 4-8x slower than 2048-bit. This generator creates RSA key pairs entirely in your browser using the Web Crypto API, the same cryptographic engine used by banks and governments. The private key is formatted in PEM (Privacy Enhanced Mail) format, which is the standard for OpenSSL, SSH, and most server configurations. Your keys never leave your device — critical because possessing someone's private key means being able to decrypt all their communications.

Common Uses for RSA Keys

RSA keys serve three primary purposes: encryption, digital signatures, and key exchange. For encryption, you share your public key openly — anyone can use it to encrypt a message that only your private key can decrypt. For digital signatures, the process reverses: you sign with your private key, and anyone with your public key can verify the signature is authentic. TLS/SSL certificates (the padlock in your browser) use RSA keys to establish secure HTTPS connections. SSH (Secure Shell) uses RSA keys for passwordless server authentication — you place your public key on the server and authenticate with your private key. GPG/PGP email encryption uses RSA for securing email communications. JWT (JSON Web Tokens) can be signed with RSA for API authentication. When generating keys for production use, protect your private key with a strong passphrase and never share it. Store it in a secure location: a hardware security module (HSM) for enterprise use, or an encrypted file with restricted permissions for personal use. The public key can be freely distributed — posting it on your website or keyserver is standard practice.

Related Resources

Frequently Asked Questions

Are these keys secure?
Yes. Generated using Web Crypto API with cryptographically secure random numbers.
Is my private key safe?
Yes. Keys are generated entirely in your browser. Nothing leaves your device.
Is there a file size limit?
No strict limit. Processing happens in your browser, so capacity depends on your device memory. Most files work smoothly.
Which browsers are supported?
All modern browsers including Chrome, Firefox, Safari, Edge, and Opera on both desktop and mobile.
Can I use this offline?
Yes. Once the page is loaded, the tool works without an internet connection since all processing is local.
Is my data secure?
Yes. Your data never leaves your browser. Nothing is stored on or transmitted to any server.

Related Articles

Related Tools

Security

AES Encrypt/Decrypt

Encrypt and decrypt text with AES-GCM — password-based

Dev

Hash Generator MD5/SHA

Generate and compare MD5, SHA-1, SHA-256, SHA-512 hashes instantly

Dev

HMAC Generator

Generate HMAC hashes — SHA-256, SHA-512 with Web Crypto

Security

Password Generator

Generate passwords, passphrases, and PINs — custom

Security

OTP Generator

Generate secure OTPs — numeric, alphanumeric, or hex

Dev

UUID Generator

Generate cryptographically secure UUIDs with batch mode and formatting options