Too Much Tools logoToo Much Tools

RSA Key Generator

Generate an RSA public/private key pair in PEM format, in your browser via Web Crypto.

Local, Runs entirely in your browser, your data never leaves your device.
Loading tool…

Generate an RSA key pair as PEM

This tool generates an RSA public/private key pair with the browser's Web Crypto API (RSA-OAEP, SHA-256, exponent 65537) and exports both keys as standard PEM blocks, SPKI for the public key and PKCS8 for the private key. It's useful for spinning up a throwaway key pair to test an encryption flow, an API integration, or a config file. Generation and export happen locally, so the private key material is created and only ever exists in your browser session.

How to use the RSA Key Generator

  1. Pick a modulus length: 2048, 3072 or 4096 bits.
  2. Click generate and wait for Web Crypto to produce the key pair.
  3. Copy the PUBLIC KEY PEM block for the side that will encrypt or verify.
  4. Copy the PRIVATE KEY PEM block and store it somewhere secure, it is shown only once.

Keys are generated for RSA-OAEP with SHA-256, an encryption/decryption key usage, not RSASSA-PKCS1 signing; if you need a signing key pair specifically, generate one with that algorithm instead.

Because everything runs in the page and nothing is persisted, refreshing or navigating away discards the key pair permanently; copy both PEM blocks before you leave if you intend to keep them.

Frequently asked questions

Is it safe to generate a private key in a browser tab?
The key pair is generated with the Web Crypto API's CSPRNG-backed implementation and never transmitted, but for keys protecting production systems, prefer generating them on the target server or an HSM rather than a browser tab.
What modulus length should I choose?
2048 bits is the common minimum for RSA today, 3072 or 4096 bits give a larger security margin at the cost of slower operations and bigger keys; pick based on what the system you're integrating with expects.
Can I use this key pair for signing instead of encryption?
Not directly, this tool generates RSA-OAEP keys scoped to encrypt and decrypt usages; a signing workflow needs a key pair generated for RSASSA-PKCS1-v1_5 or RSA-PSS instead.
Where is the private key stored after I generate it?
Nowhere, it exists only in the browser tab's memory for you to copy; there's no server-side storage, and closing or refreshing the page discards it permanently with no way to recover it.