Canonical: https://toolipedia.app/rsa-encrypt-decrypt-tool

# RSA Encrypt and Decrypt Tool

Encrypt a short text with an RSA public key using OAEP and decrypt it again with the private key, with a 2048-bit key generator and the message size limit shown.

Breadcrumbs: Toolipedia > Developer tools > Security and validator tools > RSA Encrypt and Decrypt Tool

## About RSA Encrypt and Decrypt Tool

RSA lets anyone encrypt a message with a public key that only the owner of the matching private key can read. This tool encrypts a short text with an RSA public key using OAEP padding with SHA-256 or SHA-1, and decrypts the Base64 or hex ciphertext with a private key in PEM form (PKCS#8 or PKCS#1). It shows the longest message the key can take: a 2048-bit key with OAEP and SHA-256 handles 190 bytes. A button makes a fresh 2048-bit key pair, and the sample keys are public test keys.

## How to use RSA Encrypt and Decrypt Tool
1. Choose encrypt or decrypt and the OAEP hash, which must match on both sides.
2. To encrypt, paste a public key and the message; to decrypt, paste the private key and the ciphertext.
3. Copy the ciphertext or the message, or press the button to make a new key pair, and keep the private key secret.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- rsa encrypt and decrypt tool
- rsa oaep encrypt online
- rsa decrypt with private key
- rsa public key encryption
- rsa text encryption

## Frequently asked questions

### How long a message can RSA encrypt?

Only a little less than the key size minus the padding. With a 2048-bit key and OAEP-SHA-256 that is 190 bytes. For longer data, encrypt it with AES and encrypt the AES key with RSA.

### Why is the ciphertext different every time?

OAEP adds random bytes before encrypting. Every ciphertext still decrypts to the same message, and the randomness is what makes the scheme secure.

### Which padding does this tool use?

OAEP, as in RFC 8017, with MGF1 and an empty label. The older PKCS#1 v1.5 encryption is not offered because it is vulnerable to padding oracle attacks.

### Is RSA Encrypt and Decrypt Tool free?

Yes. RSA Encrypt and Decrypt Tool on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with RSA Encrypt and Decrypt Tool:
- [File encryption](https://toolipedia.app/file-encryption)
- [Digital Signature Sign and Verify](https://toolipedia.app/digital-signature-sign-verify)
- [AES Encrypt and Decrypt with Key and IV](https://toolipedia.app/aes-key-iv-encrypt-decrypt)
- [Key Pair Generator](https://toolipedia.app/key-pair-generator)
- [Text encryption and decryption](https://toolipedia.app/text-encryption)
