LocalExcelTool
Get started

RSA Key Generator

Generate RSA-OAEP 2048/3072/4096-bit key pairs locally in your browser.

What is RSA Key Generator

This RSA key generator creates RSA-OAEP public/private key pairs with the browser's Web Crypto API. Choose 2048, 3072 or 4096-bit keys; output is standard PEM. Keys are generated locally — the private key is never uploaded anywhere.

🔒 Everything runs in your browser. Nothing is uploaded.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Generated in the tab, and that has consequences

The pair is produced by crypto.subtle.generateKey with RSA-OAEP and SHA-256, public exponent 65537 — the standard interoperable choice. The private key exists only in this tab's memory. Nothing is stored, nothing is recoverable, and a refresh destroys it. Copy it before doing anything else.

That ephemerality is a feature for a demo and a hazard for real use. A production key pair should be generated where it will live — an HSM, a KMS, or at minimum a machine with disk encryption — because a lost private key cannot be regenerated, only replaced along with everything that trusts it.

RSA-OAEP encrypts; it does not sign

The algorithm identifier determines the permitted operations. OAEP is a padding scheme for encryption and key transport; asking the same key to sign produces an error in Web Crypto. Signing needs RSASSA-PKCS1-v1_5 or RSA-PSS, which are separate algorithm names and separate key usages.

This trips people up because the key material looks identical. A key imported as 'RSA-OAEP' will refuse sign operations, and the error message usually mentions the algorithm rather than the usage — so the fix is to regenerate with the intended algorithm, not to retry.

Reading the exported formats

The export is PEM-wrapped: PKCS#8 for the private key, SubjectPublicKeyInfo (SPKI) for the public key, both standard and accepted by OpenSSL, Node and every cloud KMS import flow. The base64 body is the DER structure, wrapped at 64 characters.

Key size is the practical parameter: 2048 bits is the minimum still accepted everywhere, 3072 and 4096 are safer and slower. The real cost of RSA is that encryption is limited to a payload smaller than the modulus minus padding overhead — roughly 190 bytes at 2048 bits for OAEP-SHA256. Anything longer must be encrypted with a symmetric key that RSA then wraps, which is what every real protocol does.

How to use

  1. 1.Choose a key size
  2. 2.Click Run
  3. 3.Save the public and private keys separately

How this compares

There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.

AspectThis toolUpload-based converters
Where the file is processedIn your browser, on this pageOn the vendor's servers, after an upload
Account requiredNoUsually — free tiers ask you to sign in before lifting a limit
Size you can process for freeNo size cap, no run limitA few files per hour, or a ~5–10 MB cap before a paywall
PriceFree. Pro is $9/month, and only buys larger files and AI featuresUsually a subscription — roughly $7–15/month as of November 2026
Works offlineYes, once the page has loadedNo
Time before work starts on a 20 MB fileImmediate — there is nothing to uploadDominated by the upload — about 16 s on a 10 Mbps uplink
What it cannot preserveOutput is deterministic — verify it against any other implementationThe same — the conversion is the same maths

Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.

Frequently asked questions

Is the private key safe?

Yes. It is generated in your browser and never sent anywhere — but it disappears when you close the tab, so copy it immediately.

Which key size should I pick?

2048-bit for general use; 3072 or 4096-bit for long-lived or high-security requirements.

What this kind of conversion cannot keep

Encoding and hashing run through the browser's Web Crypto API or a pure-JavaScript implementation. The output is deterministic: the same input always produces the same digest, so you can verify a result against any other tool.

More in Encoding