About the RSA Encrypt, Decrypt and Key Pair Generator
Use this online RSA tool to encrypt short plaintext with a public key, decrypt RSA ciphertext with the matching private key, or generate an RSA public/private key pair. It is useful for testing, learning, and checking small RSA examples during development.
• How RSA Public and Private Keys Work
RSA is an asymmetric encryption algorithm, which means it uses two related keys: a public key and a private key. The public key can be shared and is commonly used to encrypt data. The private key must be kept secret and is used to decrypt data encrypted with the matching public key.
• What You Can Do on This Page
RSA Text Encryption: Encrypt short text with an RSA public key.
RSA Text Decryption: Decrypt RSA ciphertext with the matching private key.
RSA Key Pair Generation: Generate a public key and private key pair for testing or development use.
Key Options: Choose a key size and display keys in PKCS#1 or PKCS#8 format.
• Key Size and Format Notes
For modern security needs, use 2048-bit RSA or stronger when your environment supports it. 3072-bit and 4096-bit keys provide a larger security margin but may be slower. Smaller sizes such as 512-bit, 768-bit, and 1024-bit are mainly useful for learning, testing, or legacy compatibility checks, not for new secure systems.
PKCS#1 and PKCS#8 on this page refer to RSA key formats. Choose the format expected by your application, library, server, or existing configuration.
• Important RSA Usage Notes
RSA is designed for small amounts of data. It is not suitable for encrypting long text or large files directly. Real-world systems usually use hybrid encryption: encrypt the content with a symmetric algorithm such as AES, then use RSA to protect the symmetric key.