RSA Encrypt & Decrypt illustration

RSA Encrypt & Decrypt

Encrypts short messages with an RSA public key and decrypts them with the matching private key using RSA-OAEP padding. Paste PEM keys (or generate a pair) and get Base64 ciphertext, exactly as hybrid schemes do when they wrap a symmetric key.

Runs 100% in your browser — keys and data never leave your device.

Notes

  • RSA can only encrypt data smaller than the key size minus padding overhead — about 190 bytes for 2048-bit OAEP. Real systems encrypt an AES key with RSA, then the data with AES.
  • OAEP is the secure padding for RSA encryption; the old PKCS#1 v1.5 padding is vulnerable to padding-oracle attacks.
  • Runs 100% in your browser — keys and data never leave your device.

Explore the idea

This interactive demo needs JavaScript.