142+ Free Online Tools · Easy. Fast. Accurate.

RSA Key Generator

Generate an RSA public/private key pair in PEM format, entirely in your browser.

How to use the RSA Key Generator

  1. Choose a key size: 2048-bit for most uses, or 4096-bit for a larger security margin.
  2. Click Run to generate the key pair. 4096-bit keys can take a few seconds.
  3. Copy the public key (BEGIN PUBLIC KEY) to share, and keep the private key (BEGIN PRIVATE KEY) secret.

How the RSA Key Generator works

The tool asks your browser's Web Crypto API to generate an RSA key pair with the standard public exponent 65537. RSA security relies on how hard it is to factor the product of two large random primes; that product is the modulus, and its length is the key size.

The public key is exported in SPKI format and the private key in PKCS#8 format, both Base64-encoded and wrapped in PEM headers, which most libraries and tools (OpenSSL, Node.js, .NET, Java) accept directly. Keys never leave your device, but for production systems consider generating keys on the machine that will use them.

Frequently asked questions

Is this tool free?
Yes. Generate RSA key pairs at no cost, with no account required.
Are my keys sent to a server?
No. Keys are generated entirely in your browser using the Web Crypto API and never leave your device.
Which key size should I use?
2048-bit is the common default and is considered secure for most uses today. 4096-bit offers a larger security margin at the cost of slower operations.

More Security Tools

Browse all Security Tools →