RSA Encrypt
Encrypt text using RSA-OAEP with a public key.
About RSA Encrypt
RSA Encrypt secures plaintext data using RSA-OAEP public-key encryption with the SHA-256 hash function for optimal padding generation, producing ciphertext that can only be decrypted with the corresponding private key. RSA public-key encryption is the foundation of hybrid cryptosystems used in TLS, PGP, and secure key exchange protocols worldwide. The maximum plaintext size depends on the RSA key length: for a 2048-bit key with SHA-256 OAEP padding, the maximum is 190 bytes, making RSA Encrypt suitable for small payloads like symmetric keys, tokens, and short messages. All operations run in your browser via the Web Crypto API with zero server transmission.
How to Use
Paste an RSA public key in PEM format (the block beginning with -----BEGIN PUBLIC KEY----- or -----BEGIN RSA PUBLIC KEY-----) into the public key input field. Enter the plaintext message you want to encrypt in the message field, keeping in mind the key-size-dependent maximum plaintext length. Click Encrypt to run RSA-OAEP encryption using the Web Crypto API. The resulting Base64-encoded ciphertext appears in the output panel. Copy the ciphertext to send to the private key holder or for use in automated testing.
Common Use Cases
- Encrypting AES session keys or symmetric secrets for secure transmission to a recipient holding the corresponding RSA private key
- Testing RSA public key functionality during development before integrating encryption into application code or CI pipelines
- Encrypting short sensitive values such as API keys, passwords, or configuration secrets for secure storage or transmission
- Demonstrating public-key encryption concepts in educational settings where students encrypt messages using a shared public key
- Verifying that a newly generated or imported RSA public key produces valid ciphertext before deploying it to production systems