Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
RSA Key Generator

RSA Key Generator

Generate RSA public and private key pairs in PEM format with customizable key sizes and algorithms.

What is RSA Key Generator?

RSA Key Generator creates RSA public and private key pairs in standard PEM format, ready for use in encryption, digital signatures, SSL/TLS certificates, and secure communications.

RSA (Rivest-Shamir-Adleman) is one of the most widely used asymmetric encryption algorithms in modern cryptography. It uses a mathematically linked pair of keys: a public key for encrypting data or verifying signatures, and a private key for decrypting data or creating signatures.

Security Note: All key generation happens entirely in your browser using the Web Crypto API. Your keys never leave your device and are not transmitted to any server.

Key Types Explained

RSA-OAEP

Optimal Asymmetric Encryption Padding

Designed for encrypting and decrypting data. Recommended for secure data exchange, file encryption, and protecting sensitive information.

Encryption

RSASSA-PKCS1-v1_5

RSA Signature Scheme with Appendix

Used for creating and verifying digital signatures. Common in JWT tokens, code signing, document authentication, and API security.

Signatures

Key Sizes

2048-bit

Standard security level suitable for most applications.

  • Fast generation
  • Industry standard
  • Balanced performance
  • Recommended for general use

3072-bit

Enhanced security for sensitive data protection.

  • Higher security margin
  • Future-proof protection
  • Moderate generation time
  • Ideal for sensitive data

4096-bit

Maximum security for high-security environments.

  • Maximum protection
  • Long-term security
  • Slower generation
  • Enterprise-grade

How to Use RSA Key Generator

Generate secure RSA key pairs in seconds with our browser-based tool. Follow these simple steps to create your cryptographic keys:

1

Select Key Size

Choose between 2048, 3072, or 4096 bits based on your security requirements. For most applications, 2048-bit provides adequate security with optimal performance.

2

Choose Key Type

Select RSA-OAEP if you need to encrypt/decrypt data, or RSASSA-PKCS1-v1_5 if you need to create/verify digital signatures.

3

Pick Hash Algorithm

Choose from SHA-256, SHA-384, or SHA-512. SHA-256 is recommended for most use cases, while SHA-512 offers maximum hash strength.

4

Generate Key Pair

Click the "Generate Key Pair" button. Your public and private keys will be instantly created and displayed in standard PEM format.

5

Copy or Download

Use the copy button to quickly copy keys to your clipboard, or download as .pem files for secure storage and integration into your projects.

Output Formats

Public Key

Exported in SPKI (Subject Public Key Info) format, wrapped in PEM encoding. Safe to share publicly for encryption or signature verification.

Shareable

Private Key

Exported in PKCS8 format, wrapped in PEM encoding. Must be kept secret and secure. Used for decryption and signature creation.

Keep Secret

Fingerprint

SHA-256 hash of the public key in colon-separated hexadecimal format. Provides easy identification and verification of keys.

Identifier

Your Data Stays Private

Security and privacy are our top priorities. All key generation happens entirely in your browser using the Web Crypto API:

  • No server processing - Keys are generated locally using your device's cryptographic hardware and never transmitted over the network
  • No storage - Keys exist only in your browser session memory until you explicitly save them. We don't store anything
  • No tracking - We don't log, monitor, or collect any information about your key generation activity
  • Open source cryptography - Uses browser-native Web Crypto API, which is audited and maintained by browser vendors
100% Client-Side: Your cryptographic keys are generated using industry-standard algorithms entirely within your browser. No data ever leaves your device.

Features

Multiple Key Sizes

Generate RSA keys in three industry-standard sizes to match your security requirements:

  • 2048-bit for everyday use and standard security
  • 3072-bit for enhanced protection and compliance
  • 4096-bit for maximum security and long-term protection

Flexible Key Types

Support for both major RSA cryptographic use cases:

  • RSA-OAEP for secure data encryption and decryption
  • RSASSA-PKCS1-v1_5 for digital signatures and verification
  • Choose the right algorithm for your specific application

Hash Algorithm Selection

Choose from multiple cryptographic hash functions:

  • SHA-256 - Fast and secure for most applications
  • SHA-384 - Enhanced security with larger hash output
  • SHA-512 - Maximum hash strength for critical systems

Standard PEM Output

Keys exported in widely-compatible PEM format:

  • Public keys use SPKI encoding standard
  • Private keys use PKCS8 encoding standard
  • Compatible with OpenSSL, SSH, and most crypto libraries
  • Ready for immediate use in production systems

Key Fingerprint

Each generated key pair includes verification features:

  • SHA-256 fingerprint of the public key
  • Colon-separated hexadecimal format for readability
  • Easy identification and verification of keys
  • Detect tampering or key substitution

Copy and Download

Multiple options for saving your generated keys:

  • One-click copy to clipboard for quick use
  • Download as .pem files for secure storage
  • Separate files for public and private keys
  • Immediate integration into your projects
Traditional Method

Command-Line Tools

  • Install OpenSSL or similar tools
  • Learn complex command syntax
  • Manual format conversion
  • Risk of syntax errors
  • Time-consuming setup
Our Tool

Browser-Based Generator

  • No installation required
  • Simple visual interface
  • Automatic format handling
  • Error-free generation
  • Instant results
Powered by Web Crypto API: All cryptographic operations use your browser's native Web Crypto API, ensuring industry-standard security with hardware acceleration when available.

Frequently Asked Questions

What key size should I use?

2048-bit is sufficient for most applications and is the current industry standard recommended by NIST and other security organizations. It provides strong security with optimal performance for encryption and signature operations.

Use 4096-bit if you need long-term security (10+ years), work in high-security environments, or have compliance requirements that mandate larger key sizes. Keep in mind that larger keys have trade-offs:

  • Longer generation time (may take several seconds)
  • Slower encryption/decryption operations
  • Larger key file sizes
  • Increased computational overhead

3072-bit offers a middle ground with enhanced security while maintaining reasonable performance.

What is the difference between RSA-OAEP and RSASSA-PKCS1-v1_5?

These are two different RSA schemes designed for different purposes:

RSA-OAEP (Encryption)

Use for: Encrypting and decrypting data

  • Encrypt with public key
  • Decrypt with private key
  • Secure data exchange
  • File encryption

RSASSA-PKCS1-v1_5 (Signatures)

Use for: Creating and verifying digital signatures

  • Sign with private key
  • Verify with public key
  • JWT tokens
  • Code signing

Choose based on your use case: If you need to protect data confidentiality, use RSA-OAEP. If you need to prove authenticity and integrity, use RSASSA-PKCS1-v1_5.

Are the generated keys secure?

Yes, absolutely. The keys are generated using your browser's built-in Web Crypto API, which implements industry-standard cryptographic algorithms and uses a cryptographically secure random number generator (CSRNG).

Security guarantees:
  • Cryptographically secure randomness - Uses hardware entropy sources when available
  • No network transmission - Keys are generated entirely on your device
  • No server-side storage - Keys exist only in your browser session
  • Browser-native implementation - Audited by browser vendors and security researchers
  • Industry-standard algorithms - Follows NIST and IETF specifications

The Web Crypto API is the same technology used by major websites for secure communications. Your keys are as secure as those generated by professional command-line tools like OpenSSL.

Can I use these keys with OpenSSL?

Yes, fully compatible. The PEM format with SPKI (public key) and PKCS8 (private key) encoding is the standard format used by OpenSSL and virtually all cryptographic tools and libraries.

You can directly use the generated keys with:

  • OpenSSL - Command-line cryptographic toolkit
  • SSH - Secure shell authentication (with conversion)
  • Node.js crypto module - JavaScript cryptography
  • Python cryptography libraries - PyCrypto, cryptography.io
  • Java security APIs - JCE, Bouncy Castle
  • PHP OpenSSL functions - openssl_* functions
  • .NET cryptography - RSACryptoServiceProvider
  • SSL/TLS certificates - Web server configuration
Example: Verify key with OpenSSL
# Verify public key
openssl rsa -pubin -in public_key.pem -text -noout

# Verify private key
openssl rsa -in private_key.pem -text -noout

# Extract public key from private key
openssl rsa -in private_key.pem -pubout -out public_key.pem

Why does 4096-bit key generation take longer?

Larger key sizes require finding larger prime numbers, which is computationally intensive. RSA key generation involves:

1

Generate Primes

Find two large random prime numbers

2

Primality Testing

Verify numbers are actually prime

3

Calculate Keys

Compute public and private exponents

For 4096-bit keys, the prime numbers are twice as large as 2048-bit keys, making primality testing significantly more complex. Generation time depends on your device's processing power:

Key Size Typical Time Complexity
2048-bit < 1 second Fast
3072-bit 1-3 seconds Moderate
4096-bit 3-10 seconds Intensive

Note: Modern devices with hardware crypto acceleration may generate keys faster. Mobile devices typically take longer than desktop computers.

What is the key fingerprint?

The fingerprint is a SHA-256 hash of the public key, displayed in colon-separated hexadecimal format (similar to SSH key fingerprints). It serves as a short, unique identifier for your key.

Why fingerprints are useful:

  • Key verification - Confirm you're using the correct public key
  • Tamper detection - Verify the key hasn't been modified during transmission
  • Easy comparison - Compare keys without examining the full PEM content
  • Key management - Track and identify multiple keys in your system
  • Security auditing - Log and monitor which keys are in use
Example fingerprint format
SHA256:a3:4f:2c:8e:1d:9b:7f:3a:6c:5e:2d:8f:4b:1a:9c:7e:3d:6f:2a:8b:5c:1e:9d:4f:7a:3c:6e:2b:8d:5f:1a:9c

The fingerprint is cryptographically derived from the public key, so any change to the key (even a single bit) will produce a completely different fingerprint.

Key Size
Key Type
Hash
Public Key SPKI / PEM
Click "Generate Key Pair" to create keys
Private Key PKCS8 / PEM
Click "Generate Key Pair" to create keys
Fingerprint (SHA-256)
Ready
Client-side Only
Select key size based on your security needs: 2048 for general use, 4096 for high security
Choose RSA-OAEP for encryption/decryption or RSASSA-PKCS1-v1_5 for digital signatures
Use the fingerprint to verify key identity when sharing public keys
Download keys as .pem files for use with OpenSSL, SSH, and other tools
Keys are generated entirely in your browser - never sent to any server
Want to learn more? Read documentation →
1/6
Can't find it? Build your own tool with AI
Start typing to search...
Searching...
No results found
Try searching with different keywords