RSA Encryption / Decryption
Asymmetric encryption with public/private key pairs. Generate keys and encrypt/decrypt data client-side.
Key Pair Generation
How RSA Encryption Works
RSA is an asymmetric encryption algorithm that uses a key pair: a public key to encrypt and a private key to decrypt. Anyone can encrypt a message with your public key, but only you can decrypt it with your private key. This makes RSA ideal for secure key exchange and digital signatures.
This tool generates RSA key pairs and performs encryption/decryption using OAEP padding with SHA-256 via the Web Crypto API β the current standard for secure RSA operations. Keys are generated locally in your browser and never transmitted anywhere.
Common use cases
- Encrypting small pieces of data like symmetric keys or tokens
- Generating RSA key pairs for testing and development
- Verifying how RSA encryption and decryption works
- Learning public-key cryptography concepts hands-on
RSA Key and Ciphertext Formats
This RSA tool exports keys as PEM strings, including PUBLIC KEY and PRIVATE KEY headers. Ciphertext is encoded as Base64 so it can be copied into JSON, forms, logs, or another RSA decryption tool.
For best compatibility, use RSA-OAEP with SHA-256 for new tests. Use PKCS#1 v1.5 only when you need to compare against a legacy system that explicitly requires it.