Loading tool…
How to Generate RSA Key Pairs
The RSA Key Generator creates 2048-bit RSA public and private key pairs in PEM format — entirely in your browser using Web Crypto.
- Click Generate to create a new RSA-2048 key pair.
- Copy the public key (for sharing) and the private key (keep secret).
- Use the keys for SSH, JWT signing, encryption, or API authentication.
How RSA Key Generation Works
RSA generates two mathematically linked keys. The public key can encrypt data that only the private key can decrypt, and vice versa. Key generation involves selecting two large prime numbers, computing their product (the modulus), and deriving the public and private exponents. 2048-bit RSA is considered secure through 2030; 4096-bit offers a larger security margin.
Why Use Our RSA Generator?
- Browser-native crypto — uses Web Crypto API, not a custom implementation.
- PEM format — output is ready for OpenSSL, SSH, or JWT libraries.
- No server — keys are generated locally. Your private key is never transmitted.
- Instant — generation takes under a second on modern devices.
Frequently Asked Questions
Is 2048-bit RSA secure?
Yes, 2048-bit RSA is considered secure by NIST through at least 2030. For long-term security, consider 4096-bit keys.
Can I use these keys for SSH?
The generated keys are in PEM format. For SSH, you may need to convert the public key to OpenSSH format using ssh-keygen.
Is my private key safe?
The key pair is generated entirely in your browser using the Web Crypto API. The private key is never sent to any server. Copy it immediately and store it securely.
Can I generate 4096-bit keys?
Currently the tool generates 2048-bit keys. Support for additional key sizes may be added in the future.