RSA Encrypt / Decrypt
See public-key encryption in action: anyone can encrypt with the public key, only the private key decrypts.
Never paste a real production private key into a website. This page runs entirely in your browser, but for real secrets the safest place is your own machine. Use the sample keys to learn and test.
● 🔒 Your data is processed locally in your browser with the Web Crypto API and is never uploaded to our servers.
How it works
RSA-OAEP with SHA-256 is the recommended padding for RSA encryption (PKCS#1 v2.2). Because RSA can only encrypt a few hundred bytes (190 bytes with a 2048-bit key), real systems use it to encrypt a random AES key, which then encrypts the data — this is called hybrid encryption. Every encryption of the same message gives a different result, thanks to random padding.
FAQ
Can I use an OpenSSL key?
Yes, in PKCS#8 (“BEGIN PRIVATE KEY”) and SPKI (“BEGIN PUBLIC KEY”) PEM formats. Convert “BEGIN RSA PRIVATE KEY” files with openssl pkcs8 -topk8 -nocrypt.