RSA Key Generator

Generate RSA-OAEP (SHA-256) key pairs of 2048, 3072, or 4096 bits. Export public (SPKI) and private (PKCS#8) PEM files, entirely in your browser.

AlgorithmRSA-OAEP (SHA-256)
Keep your private key safe: anyone who obtains it can decrypt your data or impersonate you. Store it offline and never share it.

Key generation runs entirely in your browser. Keys are never sent to or stored on any server.

What is an RSA key generator?

An RSA key generator creates a matched pair of keys: a public key you can share freely and a private key you keep secret. This tool uses the RSA-OAEP algorithm with SHA-256.

Key generation happens entirely in your browser via the Web Crypto API — no key material is ever transmitted or stored on a server.

How to generate an RSA key pair

Choose the key size (2048, 3072 or 4096 bits) and press Generate. Larger keys take noticeably longer to produce.

The public key appears on the left in SPKI PEM form and the private key on the right in PKCS#8 PEM form. Use the copy buttons or download each as a .pem file.

Choosing the key size

2048 bits is the current baseline and is sufficient for most applications. 3072 and 4096 bits offer a larger security margin at the cost of slower generation and bigger keys.

Protecting your private key

Anyone who obtains the private key can decrypt data meant for you or sign as you. Store it offline, never commit it to a repository, and never share it. Since generation happens in your browser, the key never touches a server.

Frequently Asked Questions

How are the RSA keys generated?+
With the browser's native Web Crypto API (crypto.subtle.generateKey) using RSA-OAEP with SHA-256. The keys are generated locally on your device.
What key size should I choose?+
2048 bits is fine for most uses. 3072 and 4096 bits offer a larger security margin at the cost of noticeably slower generation.
What format are the keys exported in?+
The public key is exported as a SPKI PEM (BEGIN PUBLIC KEY) and the private key as a PKCS#8 PEM (BEGIN PRIVATE KEY) — both standard formats.
Can I use these keys for SSH?+
These are standard RSA keys intended for encryption or signing. OpenSSH uses its own key format, so you would need to convert them first.
Is the private key stored anywhere?+
No. Keys exist only in your browser — copy or download them before closing the page, because they cannot be recovered afterwards.

Related Tools

RSA Key Generator — free online rsa key generator, generate rsa key pair, rsa 2048 key generator, rsa 4096 key generator, rsa oaep key pair, public private key generator, pem key generator, online rsa keygen, rsa sha-256 key pair, jwt rs256 key generator. No signup required. Works in your browser.