Generate RSA key pairs (2048, 3072, 4096-bit) for encryption (OAEP) or signing (PSS) in PEM format using WebCrypto. Download or copy instantly.
RSA key pairs are the foundation of asymmetric cryptography — one key locks, the other unlocks, and neither can do the other's job. This generator produces a fresh pair in seconds using your browser's built-in crypto.subtle API, exports them as standard PEM files, and lets you download or copy each key individually. Nothing is sent to a server at any point.
Pick a key size (2048, 3072, or 4096 bits), a hash algorithm (SHA-256 or SHA-512), and a usage pattern (encrypt/decrypt with OAEP, or sign/verify with PSS). Then click Generate Key Pair. Both keys appear immediately below in PEM format, ready to paste into OpenSSL, Node.js, Python, or any other toolchain that speaks standard PKCS#8 / SPKI.
openssl pkcs8 -topk8 after downloading..pem file named rsa-2048-public.pem or rsa-2048-private.pem (with the chosen bit size in the filename). Click inside the textarea to select the full text for manual copying.openssl genrsa and a proper Certificate Authority workflow. Browser-generated keys cannot be embedded in a signed certificate without additional tooling.openssl pkcs8 -topk8 -in private.pem -out private-enc.pem.Key size
2048-bit is the industry minimum. 4096-bit takes noticeably longer to generate.
Hash algorithm
Key usage
OAEP is for encrypting data with a public key. PSS is for signing with a private key. They are not interchangeable — choose before generating.
How it works
Keys are generated in your browser using crypto.subtle.generateKey with exponent 65537. Both keys export as PKCS#8 / SPKI in standard PEM format — paste them directly into OpenSSL, Node.js, or any framework that accepts PEM. Nothing leaves this page.