Generate RSA or elliptic curve key pairs in PEM and JWK format using the Web Crypto API. Keys are created in your browser and never transmitted.
First time here? Choose RSA or EC Your input is processed locally and disappears when you close the tab.
Generating a key pair online sounds like a bad idea, and usually it is — most such sites generate the key on their server, which means they have seen your private key. This rsa key pair generator does it entirely in your browser via the Web Crypto API, using the operating system's own randomness, and transmits nothing.\n\nBoth families are supported. RSA at 2048, 3072 or 4096 bits remains the compatibility choice, working with essentially everything. Elliptic curve keys at P-256, P-384 or P-521 are dramatically smaller for equivalent strength — P-256 is roughly comparable to RSA-3072 while being a fraction of the size and considerably faster in use.\n\nYou get the private key as PKCS#8 PEM and the public key in both SPKI PEM and JWK, which between them cover most libraries and services. Choose signing or encryption up front, since the key usage is baked in at generation time.\n\nThe obvious warning, stated plainly because it matters: the private key is secret, nothing is stored anywhere, and closing the tab destroys it. Save it before you navigate away, never commit it to a repository, and never paste a private key into a website. Pair this with the JWT Signer for token signing, or the AES tool for symmetric encryption where a shared passphrase is more practical.
Choose RSA or EC
Pick a key size or curve, and the purpose
Generate the pair
Save the private key somewhere safe and share only the public key
RSA or EC? EC keys are far smaller for equivalent strength — P-256 is roughly comparable to RSA-3072 while being a fraction of the size and much faster. RSA remains the safer default for compatibility with older systems.
Generated by your browser's Web Crypto API using the operating system's randomness. Nothing is transmitted — which is the only acceptable way to generate a private key online.