Note: RSA encryption has a length limit based on key size (~245 bytes for 2048-bit, ~526 bytes for 4096-bit). For longer data, use RSA to exchange an AES key, then encrypt your data with AES.
Ready to generate keys
Public key will appear here after generation...
Private key will appear here after generation...


Output
Result will appear here...

Frequently Asked Questions

1. What is RSA encryption?

RSA is an asymmetric encryption algorithm that uses a pair of mathematically related keys: a public key for encryption and a private key for decryption. The public key can be shared freely, while the private key must be kept secret.

2. Is my data sent to your server?

No. All encryption, decryption, and key generation happens locally in your browser using the Web Crypto API. Your data and keys never leave your device.

3. What is the difference between RSA-2048 and RSA-4096?

RSA-2048 uses a 2048-bit modulus and is faster to compute. RSA-4096 uses a 4096-bit modulus for higher security but is slower. Both are considered secure for most applications; RSA-2048 is recommended for general use.

4. Why is there a limit on input length?

RSA encryption uses mathematical operations on fixed-size numbers. With OAEP padding, RSA-2048 can encrypt about 245 bytes and RSA-4096 about 526 bytes. For longer data, the standard approach is to use RSA to securely exchange an AES key, then use AES to encrypt the actual data.

5. How do I use keys generated here with other tools?

Keys are exported in standard PEM format (PKCS#8 for public keys, PKCS#1 for private keys). You can copy and paste them into other cryptographic tools or libraries that support these formats.

Key Features

  • Key Pair Generation — Generate RSA key pairs
  • Public Key Encrypt — Encrypt with public key
  • Private Key Decrypt — Decrypt with private key
  • Key Sizes — 1024, 2048, 4096 bit support
  • PEM Format — Standard PEM key format

How to Use

Step 1: Generate keys

Generate a new RSA key pair.

Step 2: Encrypt

Use the public key to encrypt your message.

Step 3: Decrypt

Use the private key to decrypt ciphertext.

Use Cases

Secure Messaging

Encrypt messages so only the recipient can read them.

Key Exchange

Securely exchange encryption keys over insecure channels.

Digital Signatures

Create and verify digital signatures for authentication.

Why Choose ToolZen?

FeatureToolZenOthers
PrivacyClient-SideServer Upload
CostFreeFreemium
Key Sizes1024-4096 bitFixed
FormatPEM StandardProprietary

Related Tools

AES Encryptor
AES encryption
Hash Calculator
MD5, SHA hashes
Base64 Encoder
Encode/decode
UUID Generator
Generate UUIDs
← View All