Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
RSA public-key cryptography starts with generating a key pair — a public key you can share freely, and a private key you must keep secret.
This tool generates a fresh RSA key pair in standard PEM format, ready to paste into the RSA Encryption Tool or any other software that accepts PEM-formatted RSA keys.
How it works
Choose a key size (2048-bit is the current standard for most uses; 4096-bit is stronger but slower) and the tool generates two large prime numbers, then derives a matching public and private key from them. Both are shown in PEM format — the standard, widely supported text format for cryptographic keys, beginning with lines like "-----BEGIN PUBLIC KEY-----".
- Enter key Size.
- Click Calculate to see your results.
Examples
Generating a 2048-bit key pair
Selecting 2048-bit produces a public key and private key pair suitable for most encryption and signing needs — the same size widely used across the web today.
Who should use it
- Generating a key pair to use with the RSA Encryption Tool.
- Learning what RSA public and private keys actually look like in PEM format.
Industry applications
- SSH key-based authentication
- Digital signatures and public-key infrastructure (PKI)
Advantages
- Generates real, standards-compliant PEM keys usable in real software, not just a simulation.
- Offers a choice between the current standard (2048-bit) and a stronger option (4096-bit).
Limitations
- Keys aren't stored — you're responsible for saving them securely yourself.
- 4096-bit generation and later use is noticeably slower than 2048-bit.
Common mistakes to avoid
- Sharing the private key instead of the public key — only the public key is meant to be given out.
- Losing the private key after closing the page — since nothing is stored, save both keys somewhere safe before navigating away.
Best practices
- Save both keys to a secure location immediately after generating them, since they aren't stored anywhere on this site.
- Use 4096-bit keys for long-term or especially sensitive use cases where the extra computation cost is acceptable.
Tips
- Generate a fresh key pair for each distinct purpose rather than reusing the same one everywhere — that way, if one is ever compromised, it doesn't affect everything else.