Skip to content
Tezmy Tools

RSA Key Generator

Generate an RSA public and private key pair in PEM format, in your browser

Key size

The keys are made on your device with the browser's cryptography. They are never sent anywhere, and this page keeps no copy. For production systems, many teams prefer to create keys on the server or in a hardware module.

Runs in your browser. Nothing is uploaded.

About the RSA Key Generator

RSA Key Generator makes an RSA public and private key pair in PEM text format, using your browser's own cryptography. Choose a key size of 2048, 3072 or 4096 bits, press the button, and copy or download the public key (in the standard SubjectPublicKeyInfo format) and the private key (in PKCS#8 format). The keys are created on your device and are not sent anywhere or kept by this page. They suit testing, development, JWT signing experiments, learning and quick one-off jobs.

Updated October 2026

How to use the RSA Key Generator

  1. 1Choose a key size: 2048 bits for most uses, more for longer protection.
  2. 2Press Generate key pair and wait a moment.
  3. 3Copy or save the public key to share.
  4. 4Copy or save the private key and keep it secret.
  5. 5Close the page when you are done.

How RSA keys work

RSA relies on the difficulty of factoring the product of two very large prime numbers. The public key contains that product and an exponent. Anyone can use it to encrypt a message or check a signature, but only the holder of the private key can decrypt or sign. The larger the key, the harder it is to break.

Handling the private key

The private key is the secret. Do not email it, paste it into chats or commit it to a repository. Save it with permissions that only you can read, and share only the public key. If a private key might have been exposed, replace the key pair.

  • Public key: share freely
  • Private key: never share, store safely
  • Back up the private key in a secure place
  • Replace keys on a schedule, and at once after a leak

What to do next

Use the public key to encrypt data or to verify signatures in your application, and the private key to decrypt or sign. For SSH logins use the SSH Key Generator, and for tokens see the JWT Generator and the JWT Decoder.

Related tools

Create SSH keys with the SSH Key Generator, make secure passwords with the Password Generator and compute checksums with the Hash Generator. The AES Encrypt tool covers symmetric encryption.

Features

  • 2048, 3072 and 4096-bit keys
  • PEM public key (SPKI) and private key (PKCS#8)
  • Made with the browser's secure random numbers
  • Copy and save buttons
  • No upload and no copy kept
  • Works offline once loaded

Frequently asked questions

What is an RSA key pair?

Two linked keys. The public key can be shared and is used to encrypt or to check signatures. The private key is secret and is used to decrypt or to sign.

Which key size should I choose?

2048 bits is the minimum accepted today and fine for most uses. 3072 bits is a common choice for longer protection, and 4096 gives a margin but is slower to make and to use.

Is it safe to make a key in a browser?

The keys come from the browser's cryptographically secure generator and are not sent anywhere. For very sensitive production keys, many teams generate keys on the machine or hardware that will use them.

What format are the keys in?

PEM text: the public key starts with BEGIN PUBLIC KEY and the private key with BEGIN PRIVATE KEY (PKCS#8). Most tools and languages accept these.

Can I use the key for SSH?

Use the SSH Key Generator instead, which also gives the public key in the single-line format that servers expect.

Can I use it for JWT signing?

Yes, for RS256 tokens in testing. Keep the private key on your server only.

Does the key have a passphrase?

No. The private key is not encrypted. Store it securely or encrypt it with a tool such as OpenSSL if you need a passphrase.

Are keys stored by this page?

No. They exist only on screen until you close or reload the page.

Related tools