#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
🔑 FREE · GENERATED ON YOUR DEVICE

RSA Key Pair Generator: Public and Private Keys in PEM Format

Create RSA keys locally with your browser's crypto engine and download them as PEM.

  • 🔢 2048, 3072, 4096 bits
  • 🔁 Built-in self-test
  • 📄 SPKI and PKCS#8 PEM

How to use the RSA Key Pair Generator

  1. 1. Choose size and usePick a key size and whether it is for encryption or signatures.
  2. 2. GenerateYour browser creates the key pair and runs a quick self-test.
  3. 3. Save the keysDownload public.pem to share and private.pem to keep safe.

How RSA keys work

RSA uses a pair of mathematically linked keys. The public key can be shared with anyone: they use it to encrypt messages to you or to verify your signatures. The private key stays secret and is used to decrypt or sign. Security rests on how hard it is to factor the product of two large primes.

With the default settings the tool creates a 2048-bit RSA key for RSA-OAEP encryption with SHA-256 and the standard public exponent 65537. The public key is exported in SPKI format (it begins -----BEGIN PUBLIC KEY-----) and the private key in unencrypted PKCS#8 (-----BEGIN PRIVATE KEY-----). A self-test encrypts and decrypts, or signs and verifies, a short message to prove the pair works.

Choosing settings and keeping keys safe

  • 2048 bits is the common minimum today; 3072 bits matches 128-bit security; 4096 is slower with a modest gain.
  • RSA-OAEP is for encryption; RSA-PSS is the modern signature scheme; PKCS#1 v1.5 signatures remain widely supported, for example in JWT RS256.
  • Protect the private key. Anyone who has it can decrypt your data or sign as you.
  • SSH keys use a different file format, and many teams now prefer Ed25519 for SSH.

Keys are generated by the Web Crypto API inside your browser and are never sent anywhere. For production servers, generate keys on the machine that will use them (for example with OpenSSL) and store them in a key vault or with a passphrase. Use these keys for learning, testing and development. Inspect certificates that contain public keys with the SSL certificate decoder, or try symmetric encryption in the AES text tool.

Frequently asked questions

Can I use these keys for SSH?

Not directly. SSH expects its own key format; generate SSH keys with ssh-keygen instead.

Why does 4096 bits take longer?

Finding two large primes takes more work as size grows; a few seconds is normal on phones.

Is the RSA Key Pair Generator free?

Yes, the RSA Key Pair Generator is free. The first time you generate your first key pair, you are asked for your name and WhatsApp number once. After that, this and every other Uncodemy tool opens straight away without the form.

More free tools

See all free tools