RSA Key Generator
Last Updated: June 28, 2026
Enterprise Key Generation
Keys generated locally using the Web Crypto API. Your private key never leaves your browser.
RSA Key Generator
Generate secure RSA public and private key pairs in your browser using the Web Crypto API. No uploads, no servers, complete privacy.
Configuration
Entropy Source
crypto.getRandomValues() Secure Progress
Initializing...Security Dashboard
Private Key
PKCS#8Public Key
SPKIFingerprint
Key Pair Verified
Encrypt-decrypt round trip test passed successfully.
Developer Utilities
OpenSSL Equivalent Commands
Node.js Crypto Sample
Downloads
Session Metrics
Privacy Audit & Trust Verification
All cryptographic operations execute locally using the Web Crypto API. Private keys never leave your browser.
Generate RSA public and private key pairs locally in your browser. Supports 2048/3072/4096-bit keys, RSA-OAEP padding, SHA-256/384/512 hashing, and export to PEM, JWK, and DER formats.
How To Use
Follow these simple steps to get started with rsa key generator.
Configure key settings
Choose your RSA key size (2048, 3072, or 4096-bit), hash algorithm (SHA-256 recommended), and preferred export format (PEM, JWK, DER, or All).
Generate key pair
Click 'Generate RSA Keys'. The Web Worker uses crypto.subtle.generateKey to create your RSA-OAEP key pair. Key generation progress is displayed in real time for 4096-bit operations.
Review fingerprints & verification
After generation, review SHA-256 and SHA-1 fingerprints to confirm key integrity. The tool automatically performs an encrypt-decrypt round-trip verification to confirm the key pair is functional.
Download keys securely
Download your private and public keys in your chosen format. Copy the OpenSSL commands or code samples. Store the private key in a secure location immediately.
Real-World Examples
Practical situations where rsa key generator helps solve real problems.
JWT Authentication & OAuth
Generate RSA key pairs for RS256, RS384, and RS512 JWT signing. Use the private key to sign tokens and the public key for token verification in microservices and API gateways.
HTTPS & TLS Certificate Management
Create RSA private keys for TLS/SSL certificates in web servers, load balancers, and reverse proxies. Export in PEM format compatible with Apache, Nginx, Caddy, and cloud providers.
API Security & Service Authentication
Generate RSA key pairs for API request signing, mutual TLS authentication, and service-to-service authorization in cloud-native and microservice architectures.
Why Use This Tool
Discover how this tool can improve your workflow and productivity.
Browser-Native RSA Generation
Uses the Web Cryptography API (crypto.subtle.generateKey) for cryptographically secure key generation with proper browser entropy sources. No JavaScript crypto libraries, no Math.random(), no third-party dependencies.
Multiple Key Sizes & Hash Algorithms
Generate 2048-bit, 3072-bit, or 4096-bit RSA key pairs with SHA-256, SHA-384, or SHA-512 hashing. RSA-OAEP padding ensures semantic security and resistance to chosen-ciphertext attacks.
Multi-Format Export
Export keys in PEM (PKCS#8 for private, SPKI for public), JWK, DER (Base64), or all formats simultaneously. Includes SHA-256 and SHA-1 fingerprints for easy key identification.
Zero-Knowledge Architecture
Keys generated entirely in your browser. Private keys, public keys, fingerprints, and metadata never leave your device. No server requests, no telemetry, no logging, no accounts.
Common Use Cases
Practical scenarios where this tool can help you get things done.
JWT Authentication & OAuth
Generate RSA key pairs for RS256, RS384, and RS512 JWT signing. Use the private key to sign tokens and the public key for token verification in microservices and API gateways.
HTTPS & TLS Certificate Management
Create RSA private keys for TLS/SSL certificates in web servers, load balancers, and reverse proxies. Export in PEM format compatible with Apache, Nginx, Caddy, and cloud providers.
API Security & Service Authentication
Generate RSA key pairs for API request signing, mutual TLS authentication, and service-to-service authorization in cloud-native and microservice architectures.
Tool Summary
Quick facts about this tool at a glance.
What Is RSA Key Generator?
An RSA Key Generator is a browser-based tool that creates cryptographically secure RSA public and private key pairs using the Web Cryptography API. Unlike server-based key generators that transmit private keys over the network, this tool generates keys entirely in the browser using hardware-accelerated cryptographic operations and system-level entropy sources. The tool supports 2048-bit, 3072-bit, and 4096-bit key sizes with RSA-OAEP padding, SHA-256, SHA-384, and SHA-512 hash algorithms, and exports keys in PEM (PKCS#8/SPKI), JWK, and DER formats with automatic encrypt-decrypt verification.
About This Tool
RSA Key Generator: Enterprise Key Management in Your Browser
RSA (Rivest-Shamir-Adleman) is one of the most widely used public-key cryptosystems in the world. It enables secure data transmission, digital signatures, and authentication across the internet. This RSA Key Generator creates cryptographically secure RSA key pairs entirely in your browser using the Web Cryptography API — the same API used by banks, governments, and security-critical applications.
How Browser-Based RSA Key Generation Works
The Web Cryptography API (crypto.subtle.generateKey) provides access to the browser's native cryptographic implementations, which are typically hardware-accelerated and FIPS-certified. When you click Generate, the browser:
1. Collects entropy from system-level sources including hardware random number generators, CPU timing variations, mouse movements, and keystroke timings.
2. Generates prime numbers using the browser's native primality testing algorithms to create p and q primes of the required bit length.
3. Computes the key pair by calculating the modulus (n = p × q), the public exponent (65537, the standard Fermat prime), and the private exponent d along with CRT parameters for efficient decryption.
4. Exports the keys in your chosen format (PEM, JWK, DER) using crypto.subtle.exportKey, then computes SHA-256 and SHA-1 fingerprints.
5. Verifies the key pair by performing an encrypt-decrypt round-trip — encrypting test data with the public key and decrypting with the private key to confirm integrity.
All of this happens in a Web Worker, ensuring the browser UI remains responsive even during 4096-bit key generation which can take 5-15 seconds.
Understanding RSA Key Sizes
2048-bit RSA provides 112-bit security equivalent and is the current minimum standard recommended by NIST. It is fast to generate (under 1 second), fast for encryption and signing operations, and supported by all systems. Suitable for most applications including TLS certificates, JWT signing, and API authentication.
3072-bit RSA provides 128-bit security equivalent matching AES-128. It offers a balance between security and performance. Recommended for applications requiring medium-term security assurance.
4096-bit RSA provides 256-bit security equivalent matching AES-256. It offers the highest security margin but requires significantly more time to generate (5-15 seconds in browser) and more CPU for operations. Choose 4096-bit for long-term security, high-value data protection, and compliance with stringent security standards.
RSA-OAEP: The Gold Standard for RSA Encryption
OAEP (Optimal Asymmetric Encryption Padding), defined in PKCS#1 v2.2 (RFC 8017), is the recommended padding scheme for RSA encryption. Unlike the older PKCS#1 v1.5 padding, OAEP provides provable security against chosen-ciphertext attacks. It uses a hash function and a random seed to add entropy to each encryption operation, ensuring that the same plaintext produces different ciphertext each time.
Key Formats Explained
PEM (Privacy Enhanced Mail) is the most widely supported cryptographic key format. Private keys use the PKCS#8 format with header '-----BEGIN PRIVATE KEY-----' and are compatible with OpenSSL, web servers (Apache, Nginx), and all major programming languages. Public keys use the SPKI format with header '-----BEGIN PUBLIC KEY-----' and are used in X.509 certificates, JWT verification, and TLS.
JWK (JSON Web Key) represents keys in JSON format as defined in RFC 7517. JWK is the standard key format for JWT libraries and OAuth 2.0 / OpenID Connect implementations. The JWK includes algorithm identifiers, key IDs, and all cryptographic parameters.
DER (Distinguished Encoding Rules) is the binary encoding of ASN.1 structures used in cryptographic specifications. DER is the format used inside X.509 certificates and is less human-readable but more compact than PEM.
Developer Workflow
1. Generate — Configure key size, hash, and export format, then generate the key pair in your browser. 2. Verify — Review SHA-256 and SHA-1 fingerprints. Confirm the automatic encrypt-decrypt verification passed. 3. Download — Save your private and public keys. The security report contains all metadata for your records. 4. Import — Use the provided OpenSSL commands or Node.js code samples to import keys into your application. 5. Store — Store the private key in a secure location. Never commit private keys to Git, email them, or share them through insecure channels.
Zero-Knowledge Key Management
The RSA Key Generator operates on a strict zero-knowledge model. Key generation uses the Web Cryptography API's secure random number generator, which draws entropy from hardware and system sources. Keys are created, exported, fingerprinted, and verified entirely within a Web Worker that has no network access. There are no analytics events tied to generated keys, no background requests to external servers, and no telemetry. Your private key is known only to you.
Quick Summary
Enterprise-grade RSA key generation entirely in the browser using the Web Cryptography API. Uses crypto.subtle.generateKey for RSA-OAEP key pairs with modulus length 2048/3072/4096, public exponent 65537, and hash SHA-256/384/512. Keys exported via crypto.subtle.exportKey to PEM (PKCS#8 private, SPKI public), JWK, and DER formats. SHA-256 and SHA-1 fingerprints displayed in hex, colon-separated, and base64 formats. Automatic encrypt-decrypt round-trip verification confirms key pair integrity. Web Worker processes all crypto operations to keep UI responsive during 4096-bit generation. Developer utilities include ready-to-use OpenSSL commands and Node.js crypto code samples.
Related Concepts
Explore related terms and topics associated with rsa key generator.
Frequently Asked Questions
Common questions about rsa key generator.
How can I generate RSA keys directly in my browser?
Use the RSA Key Generator above. Select your desired key size (2048, 3072, or 4096-bit), choose a hash algorithm (SHA-256 recommended), pick your export format (PEM, JWK, DER, or All), and click 'Generate RSA Keys'. The tool uses the Web Cryptography API (crypto.subtle.generateKey) to create cryptographically secure key pairs locally in your browser. The keys are then exported, fingerprinted, and verified automatically.
Are my keys generated locally or on a server?
Your keys are generated entirely in your browser using the Web Cryptography API. No data — including private keys, public keys, fingerprints, or key sizes — is ever transmitted to any server. The key generation, export, fingerprinting, and verification all happen in a Web Worker that runs locally on your device. FreeDeskTools follows a zero-knowledge architecture: we never see, store, or log your keys.
Why should I choose 4096-bit RSA?
4096-bit RSA provides a 256-bit security level, matching the security of AES-256. It is resistant against future advances in factoring algorithms and computing power. Choose 4096 for long-term security, sensitive data protection, and compliance with security standards that require high key strength. However, 4096-bit key generation is significantly slower (5-15 seconds) than 2048-bit, and operations (encryption, decryption, signing) require more CPU. For most applications, 2048-bit is sufficient and recommended by NIST and other standards bodies.
Can I use these keys for JWT signing?
Yes. The generated RSA keys use RSA-OAEP (Optimal Asymmetric Encryption Padding) which is compatible with JWT signing algorithms, particularly RS256, RS384, and RS512. Export your private key in PEM format and use it with standard JWT libraries in Node.js, Python, Go, Java, or any other language. The tool also provides a Node.js code sample that shows exactly how to implement JWT signing and verification with the generated keys. The SHA-256 hash algorithm maps to RS256, SHA-384 maps to RS384, and SHA-512 maps to RS512.
How do I export my private key securely?
The private key is displayed on screen and available for download as a .pem file. For maximum security: (1) Download the private key directly rather than copying from the browser window to avoid clipboard exposure. (2) Store the private key in a secure location such as a hardware security module, encrypted vault, or password manager. (3) Never store private keys in source control, email, cloud storage, or shared drives. (4) Set appropriate file permissions (chmod 600 on Unix systems). (5) Consider encrypting the private key with a passphrase using OpenSSL.
What is PEM?
PEM (Privacy Enhanced Mail) is a Base64-encoded format for cryptographic keys and certificates. PEM files use headers like '-----BEGIN PRIVATE KEY-----' and '-----BEGIN PUBLIC KEY-----' with footers and base64-encoded content between them. PEM is the most widely supported key format across programming languages, web servers, and cryptographic tools. The RSA Key Generator exports private keys in PKCS#8 PEM format and public keys in SPKI PEM format, both of which are compatible with OpenSSL, Node.js, Python, Java, Go, and most cloud platforms.
What is PKCS#8?
PKCS#8 (Public-Key Cryptography Standards #8) is a standard format for storing private key information, defined by RSA Laboratories in RFC 5208. It is the modern, recommended format for private keys and supports multiple algorithm types beyond RSA, including ECDSA and Ed25519. PKCS#8 files can store the raw private key (unencrypted) or include encryption with a passphrase. The RSA Key Generator exports private keys in unencrypted PKCS#8 PEM format, which is the most compatible format for OpenSSL, web servers, and programming language crypto libraries.
What is SPKI?
SPKI (Subject Public Key Info) is the standard format for storing public keys, defined in RFC 5280. It contains the algorithm identifier (RSA-OAEP with the selected hash) and the public key material (modulus and exponent). SPKI format is used in X.509 certificates and is the standard public key format for TLS, JWT verification, and SSH. The RSA Key Generator exports public keys in SPKI PEM format, which starts with '-----BEGIN PUBLIC KEY-----' and is directly compatible with OpenSSL, Node.js crypto, and all major programming languages.
What is JWK?
JWK (JSON Web Key) is a JSON-based format for representing cryptographic keys, defined in RFC 7517. A JWK for RSA includes fields like kty (RSA), n (modulus as Base64URL), e (exponent as Base64URL), alg (algorithm), and kid (key ID). JWK is the standard key format for JWT libraries and is widely used in OAuth 2.0 and OpenID Connect implementations. JWK keys can also include the private exponent (d), prime factors (p, q), and CRT parameters (dp, dq, qi) when exporting the private key.
Can I use these keys with OpenSSL?
Yes. The RSA Key Generator provides a ready-to-use OpenSSL command section that shows you exactly how to work with your generated keys. The tool generates PEM-formatted private keys (PKCS#8) and public keys (SPKI) that are fully compatible with OpenSSL. You can use the generated keys for TLS certificate signing requests, JWT signing, file encryption, and SSH key conversion. Example OpenSSL commands are displayed in the developer utilities section of the tool.
Can I generate keys offline?
Yes. Like all FreeDeskTools, the RSA Key Generator runs entirely in your browser. Once the page is loaded, you can disconnect from the internet and still generate RSA key pairs. The Web Cryptography API is built into modern browsers and requires no network access. The Web Worker for key generation, fingerprinting, and verification executes locally. No external resources, CDN scripts, or server calls are needed.
Can I use these keys in Node.js?
Absolutely. The RSA Key Generator exports keys in standard PEM and JWK formats that are directly compatible with Node.js crypto module. The tool displays a ready-to-use Node.js code sample that shows how to import your private key, import your public key, sign data, and verify signatures. The generated keys work with Node.js crypto, jsonwebtoken library, jose library, and all standard Node.js cryptographic operations.
Can I use these keys for TLS certificates?
Yes. Generate an RSA private key with the tool, then use it to create a Certificate Signing Request (CSR) with OpenSSL or your certificate authority's management console. The private key is in standard PKCS#8 PEM format that all major CAs support. Export your public key in SPKI PEM format, which is the format used in X.509 certificates.
Is browser-generated RSA secure?
Yes, browser-generated RSA using the Web Cryptography API (crypto.subtle.generateKey) is cryptographically secure. The Web Crypto API provides access to hardware-accelerated cryptographic operations and system-level entropy sources. Browser entropy sources include hardware random number generators, system interrupts, mouse movements, keystroke timings, and other platform-specific sources. The generated keys use RSA-OAEP with SHA-256/384/512 and a 65537 public exponent, which follows current cryptographic best practices. Modern browsers maintain rigorous security standards for their cryptographic implementations.
Does FreeDeskTools keep my private key?
No. FreeDeskTools never sees, stores, logs, or transmits your keys. The RSA Key Generator operates entirely in your browser using the Web Cryptography API. Key generation, export, fingerprinting, and verification all execute in a local Web Worker. No data leaves your device. There are no background requests, telemetry, or analytics related to generated keys. This is a zero-knowledge tool: your private key is known only to you.
Related Tools
Explore more tools that complement this utility.
Local File Encryptor & Decryptor
Encrypt and decrypt any file in your browser using AES-256-GCM encryption. Password-protect sensitive documents, images, and data with PBKDF2 key derivation. 100% client-side with zero uploads.
Secure Text Vault
Encrypt sensitive text messages in your browser using AES-256-GCM authenticated encryption with Argon2id key derivation. Zero-knowledge secure notes for passwords, API keys, and confidential messages. 100% client-side.
Cryptographic Secret Sharing Tool
Split a secret into secure M-of-N recovery shares with real Shamir Secret Sharing, or reconstruct it from the required threshold. Supports BIP39 seed phrases, keys, passwords, Base58/Hex/Base64 shares, QR codes, and offline recovery — entirely in your browser.
People Also Searched For
Explore related tools commonly used alongside this utility.
HKDF Key Derivation Tool
Derive cryptographic keys from a master secret using RFC 5869 HKDF (HMAC-based Key Derivation Function) in your browser. Supports SHA-256, SHA-384, SHA-512, configurable salt, info, and output length. Generate single or multiple derived keys instantly using the native Web Crypto API with zero server interaction.
Secure Password Generator
Generate cryptographically secure passwords using your browser's Web Crypto API. Supports random passwords, memorable passwords, passphrases, PINs, Wi-Fi keys, hex secrets, and Base64 secrets with real-time entropy analysis and bulk generation.
Cryptographic Hash Generator
Generate SHA-256, SHA-512, SHA-384, and SHA-1 hashes for files and text locally in your browser. Verify checksums with zero uploads, Web Crypto API support, Web Worker processing, and chunked large-file reading.
OpenPGP Message Encryptor
Encrypt, decrypt, sign, and verify messages using OpenPGP.js in your browser. Supports multi-recipient encryption, digital signatures, ASCII-armored output, and GnuPG-compatible keys with AES-256 and SHA-256.
Password Entropy Calculator
Check the mathematical entropy of any password or passphrase in your browser. Uses the Shannon formula L × log₂(R) to measure true password strength, detect weak patterns, estimate crack time, and compare Diceware passphrases — 100% client-side with zero uploads.
Reviewed by FreeDeskTools Editorial Team
RSA Key Generator has been reviewed for accuracy, usability, privacy, and browser-side performance. FreeDeskTools tools are designed to run locally whenever possible, helping users complete tasks quickly without unnecessary data collection.
Was this tool helpful?
Your feedback helps us improve RSA Key Generator and build better tools for everyone.