This free RSA key generator creates a fresh 2048- or 3072-bit RSA-OAEP key pair with SHA-256 in your browser, with no sign-up required.

The RSA Key Generator uses native Web Crypto to create the pair in the current tab, and no key bytes are sent to the application server. You can copy standard public and private PEM text without creating an account or installing a command-line utility.

RSA is asymmetric: the public key encrypts data for the key holder, while the mathematically related private key decrypts it. A public key can be shared with systems that need to encrypt for you, but the private key must remain secret because anyone who obtains it can decrypt compatible ciphertext.

rsa key generator free no sign up
Free RSA Key Generator, No Sign-Up Required

Choose between 2048 and 3072 bits

Both supported key sizes use RSA-OAEP with SHA-256 and public exponent 65537. The choice affects the modulus length, compatibility, and browser processing cost rather than the PEM envelope types.

Key size Compatibility Browser cost Practical choice
2048 bits Broadly interoperable Lower generation and operating cost Use when the receiving system supports it and broad compatibility matters most.
3072 bits Compatible with systems that accept the selected modulus length Slower generation and operations Use when the recipient supports it and the larger security margin justifies the extra browser work.

Generation is random, so running the tool twice with the same settings produces different keys. Do not expect a fixed private-key value or reuse only half of an earlier pair. Keep each public key with the private key generated alongside it.

Generate and hand off a compatible key pair

  1. Check the receiving application's requirements before generating anything. It must use RSA-OAEP with SHA-256 and exponent 65537, accept a SubjectPublicKeyInfo public key, and support a PKCS#8 private key for your internal setup.
  2. Open the generator and select either 2048 or 3072 bits. Start the generation and allow extra time for the larger modulus when you choose 3072 bits.
  3. Copy the public key, which begins with BEGIN PUBLIC KEY. Distribute only this public PEM to systems that need to encrypt messages or symmetric keys for the holder.
  4. Copy the private key, which begins with BEGIN PRIVATE KEY, and transfer it directly into an appropriate secret manager or encrypted keystore. The exported PKCS#8 private key is not password-protected.
  5. Import the private key into its protected destination and perform an end-to-end test with the exact application protocol: encrypt a small known message with the public key, decrypt it with the private key, and confirm the recovered content exactly.
  6. Close the generator tab and clear clipboard history after the private key has been securely imported. Rotate the key immediately if the private PEM is exposed.

The public and private outputs from one generation must remain paired. If you generate a replacement, update the consumer with the new public key and securely replace the old private key instead of mixing outputs from separate generations.

Match the recipient's formats and OAEP settings

PEM is the standard text envelope described in the PEM encoding rules in RFC 7468, while the RSA encryption scheme and OAEP format are covered by RFC 8017. A compatible recipient must understand both the envelope and the encryption parameters.

Output PEM marker Key structure Correct handling
Public key BEGIN PUBLIC KEY ASN.1 SubjectPublicKeyInfo, or SPKI Distribute to systems that must encrypt for the private-key holder.
Private key BEGIN PRIVATE KEY Unencrypted PKCS#8 Import directly into protected storage; anyone who obtains it can decrypt compatible ciphertext.

RSA-OAEP settings must match on both sides. The generated keys declare SHA-256, but another application may default to SHA-1 or use different OAEP label and mask-generation settings. The generator deliberately does not offer 1024-bit keys, custom public exponents, raw RSA, PKCS#1 v1.5 encryption, or SHA-1. Confirm the exact profile rather than assuming that every RSA-OAEP implementation behaves identically.

A PEM that imports successfully only confirms that the receiver can parse the key envelope. It does not prove that the receiver's OAEP configuration matches the key's configuration. The imported algorithm should also report the modulus length you selected.

Verify the full encryption path

The generator includes real cryptographic checks rather than relying only on the appearance of the PEM. Its verification exports both envelopes, imports the generated SPKI and PKCS#8 keys back into Web Crypto, encrypts a known UTF-8 message with the public key, and confirms exact recovery with the private key.

That built-in test establishes that the generated pair works inside the browser. Before relying on the keys in production, repeat a round trip through the actual application protocol:

  • Load the public key into the component that performs encryption and the private key into the component that performs decryption.
  • Use a small, non-sensitive test payload that fits within RSA's encryption limit.
  • Encrypt it through the application's normal RSA-OAEP path and decrypt it through the intended private-key path.
  • Compare the recovered plaintext exactly and confirm that the receiving side reports the selected modulus length.

If the round trip fails, check SHA-256, the OAEP label, mask-generation settings, key roles, and the expected PEM envelope before generating a replacement. Rotating a key will not fix incompatible protocol settings.

Use RSA for keys, not bulk data

RSA can encrypt only a limited amount of data directly. The normal application pattern is to generate a random symmetric key, protect that key with RSA-OAEP, and encrypt the actual file or message with authenticated symmetric encryption.

This separation matters because the protected content can be much larger than RSA can accept in one operation. It also gives the application a standard way to combine public-key key management with efficient authenticated encryption for the payload.

Do not split a large file into raw RSA blocks. It will not produce a safe or supported hybrid file format. The generator intentionally produces key material only; it does not create an encrypted-file container or a protocol-specific envelope around the data.

Protect the private key during handoff

The private PEM is unencrypted PKCS#8 output. Copying it transfers full responsibility for protecting it, so use a secret manager or encrypted keystore with strict access controls and appropriate backups.

  • Do not place the private key in source control, tickets, chat messages, analytics systems, browser sync, or ordinary notes.
  • Avoid leaving the PEM in the clipboard after import, and clear clipboard history when the destination permits it.
  • Use a trusted, patched device because browser extensions, malware, clipboard managers, and screenshots remain outside the generator's local-processing boundary.
  • Understand that the public and private outputs remain in component memory only until navigation or replacement. Closing the page does not protect a private key that was already copied elsewhere.

No key bytes are sent to the application server, but local generation is not protection from a compromised device. If the private key reaches an unauthorized recipient, revoke or replace it according to the application's key-rotation process rather than continuing to use the exposed pair.

Know what this generator does not create

This utility generates RSA-OAEP encryption keys only. It does not create RSA-PSS signature keys, CSRs, X.509 certificates, SSH keys, JSON Web Keys, or a certificate authority workflow. Its SPKI and PKCS#8 PEM outputs are encryption-key formats, so they should not be substituted for SSH private keys or certificate signing requests.

Converting either output into another format later must preserve the RSA-OAEP algorithm parameters, SHA-256 setting, public exponent, and secrecy of the private key. For production identity, certificate issuance, or TLS key management, prefer the key-generation workflow provided by the owning platform or a hardware security module.