RSA Online Key Generator and Encryption/Decryption Tool

RSA Asymmetric Cryptography Browser-side Processing
Keys are generated locally in your browser and are never uploaded to the server. Do not use them for production.
512 / 1024-bit RSA is insecure and should only be used for legacy compatibility. Do not use it in production.
Raw Base64
Raw Base64
PEM headers, footers, and line breaks have been removed. The value can be pasted directly into .env, JSON, or configuration files.
Encryption / decryption uses public-key encryption and private-key decryption. Signing / verification uses private-key signing and public-key verification. These are different purposes and should not be mixed.
Privacy Notice:Encryption and decryption are performed locally in your browser. Do not use real production keys or sensitive data.

Generate 512–4096-bit key pairs locally, with 7 export formats and support for encryption, decryption, signing, and verification

RSA Online Key Generation and Encryption

RSA is a widely used asymmetric cryptographic algorithm. The public key is used for encryption and signature verification, while the private key must remain secret and is used for decryption and signing. This tool generates and processes keys locally in the browser.

Key Generation and Export

Keys of 512, 1024, 2048, 3072, or 4096 bits can be generated, with 2048 bits as the default. 512-bit and 1024-bit keys are intended only for legacy-system compatibility and are not recommended for modern security.

Seven formats are supported: PKCS#8 and SPKI as the default combination, PKCS#1, OpenSSH public key, JWK, .NET RSAKeyValue XML, raw Base64, and raw Hex. Raw formats remove headers and line breaks. OpenSSH exports only the public key; the private key remains in PKCS#8.

Encryption and Decryption

The normal flow uses the public key for encryption and the private key for decryption. RSA-OAEP with SHA-256 and PKCS#1 v1.5 are supported. The approximate maximum plaintext size is the key size in bytes minus 66 bytes for OAEP with SHA-256, or minus 11 bytes for PKCS#1 v1.5. For large data, use a hybrid approach: encrypt the data with AES and encrypt only the AES key with RSA.

Signing and Verification

The private key signs and the public key verifies. RSA-PSS with SHA-256 and PKCS#1 v1.5 are supported. Signatures are output as Base64 and can be filled into the verification form with one click. Encryption and signature operations are clearly distinguished.

Import Existing Keys

Existing PEM, DER, OpenSSH, JWK, and XML keys can be pasted directly. If a public key is provided for an operation that requires a private key, a warning is displayed. For password-encrypted keys, decrypt and export them first using OpenSSL or PuTTYgen; the tool does not decrypt password-protected keys online.

Runtime Environment

The tool depends on WebCrypto and a secure context, normally an HTTPS environment. Large keys may take some time to generate.

Use Cases

Useful for preparing keys before API integration, testing signature interoperability, checking key formats, and learning about asymmetric cryptography.

Privacy

Key generation and cryptographic operations are performed locally. Keys are neither uploaded nor stored on the server. Use test keys for learning and integration rather than production keys. For RSA key format conversion, use a dedicated RSA key format converter.

Generate RSA key pairs and perform encryption, decryption, signing, and verification online

RSA is one of the most widely used asymmetric algorithms. The public key is used for encryption and verification, while the private key is used for decryption and signing. The tool generates key pairs locally in the browser and combines encryption, decryption, signing, and verification on one page.
  • Key sizes of 512, 1024, 2048, 3072, and 4096 bits are available; 2048 is the default, while 512/1024 bits are marked for legacy-system compatibility
  • Supports 7 key export formats: PKCS#8 and SPKI, PKCS#1, OpenSSH public key, JWK, XML, raw Base64, and raw Hex
  • Encryption and decryption support RSA-OAEP with SHA-256 and PKCS#1 v1.5 and show the approximate maximum encryptable bytes based on key length
  • Signing and verification support RSA-PSS with SHA-256 and PKCS#1 v1.5; signatures are output as Base64 and can be filled into the verification field with one click
  • Existing PEM, DER, OpenSSH, JWK, and XML keys can be pasted directly for use
  • Using a public key for a private-key operation or providing a password-encrypted key produces clear guidance
Suitable for preparing keys before API integration, testing signature verification, and learning asymmetric cryptography. Generation and operations depend on WebCrypto and require an HTTPS environment; keys are generated locally and never uploaded. Do not use the generated keys directly in production.
Comments 0
No comments yet. Be the first to comment!
Comment content cannot be empty
0/255