RSA Key Pair Generator

Keys are generated locally using your browser's Web Crypto API and never leave your device. Reload the page to discard them.

How to use this RSA key pair generator

  1. Choose a key size (2048-bit is standard, 4096-bit is more secure but slower).
  2. Click "Generate Pair".
  3. Copy the public key to share, and keep the private key secret.

How does this work?

Keys are generated using your browser's native Web Crypto API (crypto.subtle.generateKey), the same cryptographic engine used by browsers for TLS — nothing is sent to any server, and the keys exist only in your browser's memory.

Is it safe to generate a private key in a browser?

The Web Crypto API is a well-audited, standard browser feature — the generation itself is sound. Just be sure to close this tab and clear your clipboard once you've saved the keys somewhere secure, since nothing here persists after a reload.

Should I use 2048 or 4096 bits?

2048-bit is still considered secure for most use cases through the foreseeable future and is faster to generate and use. 4096-bit offers a larger security margin at the cost of speed, useful for long-term or highly sensitive keys.