RSA Encrypt / Decrypt

Free online RSA asymmetric encryption with 1024/2048-bit key generation, PKCS#1/PKCS#8 and OAEP/PKCS1 padding. Runs entirely in your browser.

Runs locally · data never uploaded
Advertisement

How to use

What it does

RSA is asymmetric: encrypt with the public key, decrypt with the private key — handy for exchanging symmetric keys or signing. This tool generates 1024/2048-bit key pairs locally, imports/exports PEM (PKCS#1 / PKCS#8), and supports OAEP and PKCS#1 v1.5 padding, all in your browser. The private key never leaves your device.

Example

  1. Click "Generate key pair" to get a public and a private key (2048-bit by default; generation is slow, please wait).
  2. Pick "Encrypt", type the plaintext and click "Execute" to get Base64 ciphertext.
  3. Switch to "Decrypt", paste the private key, paste the ciphertext back, then "Execute" to recover the plaintext.

Notes

  • Plaintext is capped by the key size: with OAEP on a 2048-bit key the limit is about 190 bytes.
  • OAEP is safer; PKCS#1 v1.5 is for legacy interop. Both ends must match.
  • Key generation is CPU-heavy; 2048-bit may take from hundreds of ms to a few seconds.

FAQ

Q1.How is RSA different from AES?
RSA is asymmetric with a public/private key pair and is slow, so it suits short data or key exchange. AES is symmetric, fast and good for bulk data. A common pattern is RSA-encrypting the AES key, then AES-encrypting the body.
Q2.Can my keys leak?
No. Key generation and crypto run in your browser; the private key stays on your device and is never uploaded. Avoid "remember params" on shared computers.
Q3.OAEP or PKCS#1 v1.5?
Prefer OAEP — it resists adaptive chosen-ciphertext attacks and is safer. PKCS#1 v1.5 is only for legacy systems. Both ends must use the same padding to interoperate.
Q4.Why does it say the plaintext is too long?
RSA encrypts one block at a time. On a 2048-bit key with OAEP+SHA1 the limit is about 190 bytes. For long text use AES and protect only the AES key with RSA.
Advertisement

Related tools