RSA Encrypt / Decrypt / Sign.
Encrypt with RSA-OAEP, decrypt, sign and verify with PKCS#1 v1.5 or PSS using PEM keys, in your browser.
Runs in your browserAbout RSA Encrypt / Decrypt / Sign
RSA Encrypt / Decrypt / Sign works with the RSA keys you already have in PEM form. Paste a public key, a private key in PKCS#8 (BEGIN PRIVATE KEY) or traditional PKCS#1 (BEGIN RSA PRIVATE KEY) format, or even a certificate, and choose an operation. Encryption uses RSA-OAEP with SHA-256 by default, the padding every modern library recommends; decrypt reverses it with the private key. Signing supports RSASSA-PKCS1-v1_5, which is what JWT RS256 and most code-signing tools use, and RSA-PSS, the safer probabilistic scheme behind PS256. Verify tells you whether a Base64 or hex signature matches the message and key. For example, a PKCS#1 v1.5 SHA-256 signature made here is byte-for-byte identical to openssl dgst -sha256 -sign key.pem, so you can check a signature produced by a build pipeline. The most common mistake is trying to encrypt a long message: with a 2048-bit key and SHA-256, OAEP can encrypt at most 190 bytes, which the details panel shows; larger data should be encrypted with AES and only the AES key wrapped with RSA. Others are mixing up the OAEP hash between sender and receiver, verifying with the wrong scheme, and expecting PKCS#1 v1.5 encryption, which WebCrypto deliberately does not offer. Encrypted private keys must be decrypted first. Everything runs locally with WebCrypto, and inputs are never saved in the page address.
How to Use
- Paste a PEM public key, private key or certificate.
- Choose the operation, scheme and hash, then enter the message (and the signature to verify).
- Copy the ciphertext or signature, or read the verification result.
Frequently Asked Questions
Why can't I encrypt a long text?
RSA-OAEP can only encrypt a few hundred bytes (190 bytes for a 2048-bit key with SHA-256). Real systems encrypt the data with AES and encrypt only the AES key with RSA.
Why does RSA-PSS give a different signature every time?
PSS adds a random salt to each signature. Every one of them verifies; only PKCS#1 v1.5 signatures are deterministic.
Can I generate a key pair here?
Not in this tool. Generate one with openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072, then paste the PEM.
Is my private key uploaded?
No. All operations use your browser's WebCrypto, the page makes no network requests, and the inputs are not stored in the URL or history.
Related Tools
Encrypt and decrypt text with AES-GCM, AES-CBC or AES-CTR using a passphrase or a raw key, in your browser.
Decode PEM or DER certificates to see subject, issuer, validity, SANs, key and extensions.
Decode, inspect, and verify JSON Web Tokens.
Generate MD5, SHA-256, SHA-512, and other hashes.
Verify or compute HMAC signatures for GitHub, Stripe, Slack, Shopify and custom webhooks.
Hash and verify passwords with bcrypt or Argon2.