←
Security

RSA Key Generator

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

RSA key pairs as PEM files

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Saves as
PEM
Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Offline use
Works without a connection once this page has loaded
Built with
Web Crypto
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About RSA Key Generator

RSA Key Generator creates a new RSA public/private key pair with your browser's Web Crypto API and gives you both keys as standard PEM text: the private key in PKCS#8 format (BEGIN PRIVATE KEY) and the public key in SubjectPublicKeyInfo format (BEGIN PUBLIC KEY). These are the same formats produced by openssl genpkey, and they can be loaded by OpenSSL, Node.js, Python, Java, Go and most JWT libraries.

Choose a modulus of 2048, 3072 or 4096 bits and the algorithm the keys are generated for: RSA-OAEP for encryption, or RSASSA-PKCS1-v1_5 or RSA-PSS for signatures such as JWT RS256 and PS256. The public exponent is 65537. The page also shows the public key as a JWK and a SHA-256 fingerprint so you can tell keys apart. Keys are generated from your device's secure random source and are never sent anywhere.

RSA Key Generator runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use RSA Key Generator

  1. Choose a Key size (2048 bits is the minimum recommended today; 3072 or 4096 bits for long-term keys).
  2. Choose the Algorithm and hash the keys are meant for. A key pair is generated as soon as the page opens.
  3. Click Generate keys to create a new pair with your settings.
  4. Copy the keys or click Download private key and Download public key to save private.pem and public.pem. Store the private key securely.

Frequently asked questions

Are the keys generated securely?

Yes. They are created by the browser's native Web Crypto implementation, which uses the operating system's cryptographically secure random number generator. The page makes no network requests with the keys. For keys that protect production systems, many organisations still prefer to generate them on the server or in a hardware security module where they will be used.

Does the algorithm choice change the PEM file?

No. The exported files are plain RSA keys tagged with the standard rsaEncryption identifier, so the same key pair can be used for encryption or signing in other software. The choice only matters inside Web Crypto, which ties a key to one algorithm and hash.

How do I convert the private key to the old BEGIN RSA PRIVATE KEY format?

Run openssl pkey -in private.pem -traditional -out private-rsa.pem (OpenSSL 3) or openssl rsa -in private.pem -out private-rsa.pem (OpenSSL 1.1). To get an OpenSSH public key, use ssh-keygen -i -m PKCS8 -f public.pem.

Why does 4096-bit generation take longer?

Generating an RSA key means finding two large random primes, and the time needed grows quickly with size and varies from run to run. 2048-bit keys usually take well under a second, while 4096-bit keys can take several seconds on a phone.

Which key size should I choose?

2048 bits is considered secure until about 2030 by NIST. Use 3072 bits for 128-bit security beyond that, or 4096 bits if a system requires it. Larger keys make signing and decryption slower.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it