Encrypt and decrypt short text with RSA
Use this RSA tool to encrypt short text with a public key or decrypt matching ciphertext with its private key. It is intended for local testing and learning, not for handling secrets you cannot safely process in a browser.
How it works
- Generate or paste a compatible PEM key pair.
- Encrypt a short message with the public key to produce Base64 ciphertext.
- Decrypt that ciphertext with the corresponding private key and confirm the original message.
Capabilities and limits
- Works with PEM key material for local RSA experiments.
- Uses the public key for encryption and the matching private key for decryption.
- RSA is unsuitable for large payloads; use authenticated symmetric encryption for data and protect keys carefully.
Examples
Short test message
message: deploy-ready
key: RSA public PEMEncrypt the text, then decrypt the Base64 result using the paired private key.
Key-pair round trip
public key → encrypt → Base64 ciphertext
private key → decrypt → original textThis confirms that the public and private keys belong to the same pair.
Frequently asked questions
Can I decrypt with an RSA public key?
No. Public-key encryption is reversed with the matching private key. Signing is a separate operation with different verification semantics.
Should I encrypt passwords with RSA?
Do not design password storage around reversible encryption. Use a purpose-built password hashing system on a trusted server.