RSA Key Pair Generator

Generate RSA public/private key pairs in PEM format (Web Crypto API)

100% In-BrowserNo Server UploadFree, No Signup
Cryptography
For EngineersFastPass - AI Career Agent

AI analyzes your skills and matches you with the best opportunities. Get a free market value assessment.

Get Started Free

How to Use

  1. Choose key size

    Select 2048 or 4096 bits in the toolbar.

  2. Generate keys

    Click "Generate" to create the RSA key pair.

  3. Copy keys

    Use the "Copy" button to copy the PEM-formatted public and private keys.

RSA Key Pair Generator Examples

RSA-2048 key pair

Input
(no input needed)
Output
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQE...
-----END PUBLIC KEY-----

-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0B...
-----END PRIVATE KEY-----

Select "2048" in the toolbar and click Generate.

RSA-4096 key pair

Input
(no input needed)
Output
-----BEGIN PUBLIC KEY-----
(longer key)...
-----END PUBLIC KEY-----

-----BEGIN PRIVATE KEY-----
(longer key)...
-----END PRIVATE KEY-----

4096 bits provides stronger security but takes a few seconds to generate.

Features

  • RSA-OAEP (SHA-256) key pair generation
  • 2048-bit and 4096-bit support
  • Public key: SPKI PEM format
  • Private key: PKCS8 PEM format
  • Secure randomness via Web Crypto API
  • Keys are generated locally (never sent to servers)
  • Dark mode support

FAQ

Should I choose 2048 or 4096 bits?

2048 bits is still considered secure, but 4096 bits is recommended for long-term security. 4096-bit keys take longer to generate and process but provide significantly stronger security.

Can I use generated keys in production?

For testing purposes, yes. For production, consider generating keys with a Key Management System (KMS) or HSM. Back up browser-generated keys securely and handle them with care.

Is my data sent to a server?

No. All key generation happens locally in your browser using the Web Crypto API. Private keys are never transmitted externally.