RSA Encrypt / Decrypt
Seal a short message with someone’s public RSA key (SPKI or PKCS#1) so only the matching private key can open it, or decrypt an RSA-OAEP ciphertext with your private key (PKCS#8 or PKCS#1). The key never leaves your browser and no network request is made. Pairs naturally with key sets exported by openssl or generated by the Keypair Generator.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What the tool encrypts and returns
Paste an RSA key into the text box and the message into the Payload field. Encrypt mode takes plain text and returns RSA-OAEP ciphertext as base64 or hex; decrypt mode takes the ciphertext and gives back the text. Because OAEP seals one block, the output is roughly the key length — 256 bytes from a 2048-bit key.
When to reach for it
This seals a small secret for the holder of one specific private key: a passphrase to hand to a colleague, a licence token, or a symmetric key that will encrypt something much larger. You need only the recipient’s public key, with no prior shared secret.
Options that change the result
The OAEP hash must match on both sides; SHA-256 is the default, SHA-384 hardens it further, and SHA-1 exists only to interoperate with old systems. The encoding is presentational — base64 is compact, hex is easier to inspect — and decrypt reads whichever one you select.
Keys, sizes and failure modes
Public keys may be SPKI or PKCS#1 and private keys PKCS#8 or PKCS#1, with PKCS#1 forms re-wrapped so Web Crypto can import them. A 2048-bit key caps the message at 214 bytes, so over-long text fails with an explicit error, as does using a private key to encrypt. Keys are handled by the browser’s Web Crypto in this tab, never uploaded, logged or stored.
Questions
What key formats are supported?
Public keys as SPKI (-----BEGIN PUBLIC KEY-----) or PKCS#1 (-----BEGIN RSA PUBLIC KEY-----); private keys as PKCS#8 (-----BEGIN PRIVATE KEY-----) or PKCS#1 (-----BEGIN RSA PRIVATE KEY-----, the default output of openssl rsa). PKCS#1 keys are re-wrapped to the PKCS#8/SPKI forms Web Crypto requires.
Why is there a size limit on the message?
RSA-OAEP encrypts one block at a time: a 2048-bit key holds at most 214 bytes of message data (256 minus OAEP overhead), so this tool is for secrets like passphrases, keys or short notes — not large files. For bulk data, encrypt with a symmetric key and encrypt that key with RSA.
Must the OAEP hash match on both sides?
Yes. The hash selected here defines the OAEP padding for both encrypting and decrypting. If a ciphertext was created with a different hash, decryption fails with a padding error — try switching the hash option to what the sender used.
Is the key uploaded anywhere?
No. The key is parsed and used only in the browser’s Web Crypto implementation. The page makes no network requests (this is enforced by the platform’s privacy tests), so the private key stays on your machine.
Related tools
See category- Cryptographic Keypair Generator
- Text Encryption (AES-GCM)
- SSH Key Fingerprint
- Base64 Encode / Decode
Cryptographic Keypair Generator
Generate RSA, ECDSA or Ed25519 key pairs in the browser and export them as PEM, with an optional sign-and-verify check.
Text Encryption (AES-GCM)
Encrypt or decrypt text with a passphrase using AES-256-GCM and PBKDF2, entirely on your device.
SSH Key Fingerprint
Compute the SHA256 and MD5 fingerprints of an SSH public key, with key type and size.
Base64 Encode / Decode
Convert text or a file to and from Base64, with URL-safe and MIME line-wrap options.