RSA Encrypt / Decrypt: Generate Keys and Protect Data
RSA Encrypt / Decrypt generates 2048-, 3072-, or 4096-bit key pairs in your browser and exports the keys as PEM. Encrypt with the public key and decrypt with the private key using RSA-OAEP with SHA-256. RSA is best for small payloads; at 2048 bits, the maximum is about 190 bytes. For larger data, use RSA to encrypt a symmetric key and AES to encrypt the data.
RSA Encrypt / Decrypt is a browser-based tool for generating RSA key pairs and encrypting or decrypting small payloads. It creates 2048-, 3072-, or 4096-bit keys with WebCrypto and exports both keys as PEM. Use it to work with RSA locally without sending your keys to a server.
Encryption uses RSA-OAEP with SHA-256. To encrypt, use the public key; to decrypt, use the corresponding private key. At 2048 bits, the maximum payload is about 190 bytes, so RSA is not suited to encrypting large amounts of data directly. For larger data, the approach described here is to encrypt a symmetric key with RSA and encrypt the data with AES.
RSA is asymmetric: its public and private keys have different roles. PEM is a text-based format for representing keys, while RSA-OAEP specifies the encryption padding and SHA-256 the hash algorithm used with it. These details make the tool useful for trying a small RSA operation or generating keys for a workflow. For large payloads, hybrid encryption avoids using RSA to encrypt the entire data payload.
The tool runs entirely in your browser, and keys never leave your browser. Your input is processed on your own device; nothing is uploaded, stored, or sent to a server. After the page has loaded, it works offline without a server dependency.
Developers and DevOps engineers can use RSA Encrypt / Decrypt to explore public-key encryption, generate PEM keys, or test small payloads locally. It is also useful when you want a private, browser-based way to try RSA-OAEP with SHA-256.
Step 1: Generate an RSA key pair and choose a key size: 2048, 3072, or 4096 bits.
Step 2: Copy or save the exported public and private keys in PEM format for the operation you need.
Step 3: Enter the content you want to process and provide the appropriate key.
Step 4: Encrypt with the public key or decrypt with the matching private key using RSA-OAEP with SHA-256.
Step 5: Copy the resulting output, keeping the private key protected.
Use case: Generate an RSA key pair for a development or testing workflow, then export both keys as PEM.
Use case: Encrypt a short message with a public key and check that it can be decrypted with the corresponding private key.
Use case: Test RSA-OAEP with SHA-256 on a known small payload while learning how public-key encryption works.
Use case: Process sensitive test content locally instead of uploading it to a third-party page.
Use case: Check whether a supplied RSA ciphertext can be decrypted with the private key you have.
Use case: Explore a hybrid-encryption design by using RSA to encrypt a symmetric key and AES to encrypt larger data.