RSA Key Pair Generator

What is an RSA Key Pair Generator?

Generate 2048-bit or 4096-bit RSA public and private key pairs in standard PEM format (`-----BEGIN RSA PRIVATE KEY-----`, `-----BEGIN PUBLIC KEY-----`) using Web Crypto APIs.

Why Use This Tool?

  • SSH & TLS Certificate Setup: Generate RSA key pairs for server authentication, HTTPS TLS certificates, and JWT signing.
  • Local Dev Testing: Create asymmetric key pairs for software unit tests and mock authentication servers.
  • 100% In-Browser Privacy: Generate private keys locally without exposing them to remote key generator servers.

How to Use

  1. Select Key Size: 2048 bits (Standard) or 4096 bits (High Security).
  2. Click Generate RSA Key Pair.
  3. Copy Public Key PEM and Private Key PEM.

Real Working Example

Input:

Key Size: 2048 bits | Format: PKCS#8 PEM

Output Result:

Private Key:
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC...
-----END PRIVATE KEY-----

Public Key:
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu...
-----END PUBLIC KEY-----

Important Technical Details & Security Standards

  • Web Crypto API Engine: Uses browser native `crypto.subtle.generateKey` for fast, hardware-accelerated RSA key generation.
  • PKCS#8 / SPKI PEM Formatter: Converts raw CryptoKey ArrayBuffers into standard Base64 PEM blocks.
  • Local Memory Execution: Private keys are generated locally and never transmitted across the network.

Related Security & Crypto Tools

Frequently Asked Questions

Is 2048-bit RSA key length secure?

Yes, 2048-bit RSA is currently secure and standard; 4096-bit provides higher long-term security margins.

What is the difference between Public Key and Private Key?

The Public Key is shared freely to encrypt data or verify signatures; the Private Key must be kept strictly secret to decrypt data or sign messages.

Are my private RSA keys uploaded to a server?

No, key generation occurs 100% locally inside your web browser memory.

Is it free?

Yes, 100% free.

What does PEM format mean?

PEM (Privacy-Enhanced Mail) is a text format containing Base64 encoded binary certificate or key data wrapped in header lines.

Can I use these keys for SSH or SSL?

Yes, generated public and private keys conform to standard PKCS#8 and SPKI formats used in SSH and SSL/TLS.