Why generate RSA keys in the browser instead of OpenSSL?
Many developers still run openssl genrsa on a workstation—and that remains a solid choice for automation. A browser-based RSA key generator helps when you are on a locked-down machine, writing a tutorial, or need a quick PEM key pair without installing a toolchain. You get interoperable text that matches what most runtimes import, while keeping the private key in memory you control until you copy it elsewhere.
This page focuses on RSA-OAEP with SHA-256 because that is what the Web Cryptography API exposes for encrypt/decrypt key pairs. Libraries that expect RSA signing may import the same PEM but configure RSA-PSS or RSASSA-PKCS1-v1_5 separately. For password storage, never substitute RSA for bcrypt, Argon2, or your framework’s password APIs—use the bcrypt hash generator when you need slow hashing for credentials.
How to use this RSA key generator (step by step)
- Pick a modulus length. For new systems, start at 2048 bits unless a standard mandates 3072 or 4096. Use 1024 bits only for legacy compatibility or fast classroom demos.
- Click Generate key pair. Larger keys take longer; generation runs entirely on your device.
- Copy the public key PEM to clients, configs, or documentation that only need encryption or verification material. Keep the private key PEM in a password manager, secret store, or encrypted file—never in public repositories.
- Use Copy public + private when you need both blocks in one paste (for example moving into a local vault). Use Upload PEM file to load an existing key bundle from disk and review or edit the text fields.
Keywords and search intents this tool covers
People often search for an RSA key generator online, create RSA public private key PEM, 4096 bit RSA generator, or Web Crypto RSA example. This page satisfies those intents with a no-login workflow and explicit privacy boundaries. If you are validating fingerprints or comparing digests of the same key material, the hash generator can compute SHA-256 hashes of strings you paste locally.
PEM format, PKCS#8, and certificates (quick guide)
A PEM file is Base64-encoded DER with header lines such as BEGIN PUBLIC KEY or BEGIN PRIVATE KEY. This tool outputs PKCS#8 private keys and SPKI public keys—the usual interchange format for application code. A TLS certificate wraps a public key with metadata and a CA signature. To inspect a certificate served from a public HTTPS URL, use the SSL certificate checker. For PEM files on disk, use Upload PEM file above or your platform's crypto utilities.
Security notes and responsible use
Treat generated RSA private keys like passwords. If you suspect exposure, rotate and revoke according to your system’s design. For interactive password strength feedback when teaching authentication, open the password strength meter. For API verification patterns that use shared secrets instead of asymmetric keys, the HMAC generator may be a better fit than RSA.
Related security and encryption tools
Browse the full security and encryption tools catalog. Highlights:
- Password Strength Meter — Score password entropy, estimate crack time, and get practical hardening tips.
- bcrypt Hash Generator — Generate bcrypt hashes with configurable cost for secure password storage testing.
- AES Encrypt & Decrypt — Encrypt and decrypt text with AES-256 and a passphrase—runs fully in your browser.
- CSP Builder — Toggle Content-Security-Policy directives and copy a header value ready for your server.
- Security Headers Checker — Analyze security-related HTTP headers on any URL with graded guidance to harden responses.
- JWT Encoder — Build HS256-signed JWTs from custom header and payload for API and auth testing.
- HMAC Generator — Create HMAC-SHA256 or HMAC-SHA512 signatures with a secret for webhook and API verification.
- SSL Certificate Decoder — Paste PEM certificates to read subject, issuer, SANs, and validity windows.
- .htaccess Generator — Assemble common Apache .htaccess rules for redirects, HTTPS, caching, and access control.