MSRX Tools

RSA Key Pair Generator

Generate a PEM key pair in your browser, never on a server.

Everything runs inside your browser. Your files never leave your device.

Result

The result appears here as you type.

Ask about RSA Key Pair Generator

Questions about what this tool does, which option to pick, or what it can and cannot handle.

The question you type here is sent to an AI provider to be answered — your files and whatever you put in the tool above are not, and the assistant cannot see them. Answers are generated and can be wrong. The tool itself is not guessing: it runs deterministic code on your device.

About the RSA Key Pair Generator

Public-key cryptography splits a key in two. One half you publish; the other you guard. Anyone can verify a signature or encrypt a message with the public half, and only the private half can produce that signature or read that message. This page generates such a pair, in your browser, and hands you both in PEM format.

The pair is produced by your browser's WebCrypto implementation — the same code path that establishes TLS connections — and it exists nowhere else. Nothing is transmitted, nothing is stored, and reloading the page produces a completely different pair. That last point is worth taking seriously: copy the private key somewhere safe before you navigate away, because it cannot be regenerated and there is no copy to recover.

Choose the purpose before the size. A signing pair uses RSASSA-PKCS1-v1_5, which produces and verifies signatures; an encryption pair uses RSA-OAEP, which encrypts and decrypts. WebCrypto binds a key to its purpose deliberately, and using one for the other is a category error that real cryptographic libraries refuse for good reasons.

On size: 2048 bits remains the standard and is not considered weak. 3072 and 4096 buy more margin at a real cost — generation takes noticeably longer and every operation afterwards is slower. If you are choosing freshly for a system you control and do not need RSA specifically, Ed25519 is faster, smaller and generally the better modern answer. RSA earns its place through compatibility, which is a perfectly good reason to be here.

Remember what a signature does and does not prove. It proves the holder of the private key signed that exact content. It says nothing about who that holder is — establishing that is what certificates and published key fingerprints exist for.

How to use it

  1. 1Choose whether the pair is for signing or for encryption. The two use different algorithms and are not interchangeable.
  2. 2Pick a key size. 2048 bits unless a specification or a security policy requires more.
  3. 3Choose the hash. SHA-256 is the sensible default and the widest supported.
  4. 4Copy both keys out before leaving the page. The private key in particular exists only in this tab and cannot be regenerated.

Questions

Is the private key sent to a server?
No. Key generation runs in your browser's cryptography engine and both halves are exported locally. There is no request that could carry them and no storage they are written to. Generating with the network disconnected demonstrates it.
Is it wise to generate keys in a browser at all?
For test keys, development and non-critical signing, it is reasonable — WebCrypto's randomness is the operating system's. For keys protecting production infrastructure or real money, generate them on a machine you control with OpenSSL or an HSM, where the key never passes through a rendering engine at all.
What is the difference between the two purposes?
A signing key proves you produced something; anyone with the public half can verify it. An encryption key lets anyone with the public half send you something only you can read. WebCrypto restricts a key to the purpose it was created for.
Should I use RSA or a modern elliptic curve?
Ed25519 for anything new where you control both ends: smaller keys, faster operations, fewer ways to misuse. RSA when you need to interoperate with something that expects it, which is still a great deal of software.