ENES

RSA Key Pair Generator

Generate cryptographically secure 2048-bit and 4096-bit RSA public and private key pairs. Export to standard PKCS#8 / SPKI PEM format with one-click download.

Runs in your browser · Free, no sign-up · Nothing is stored

🌐 Public Key(SPKI format)

Safe to share. Distribute for verifying RS256-compatible signatures.

🛡️ Private Key(PKCS#8 format)

Confidential. Keep this private. Used for creating digital signatures. Do not share publicly.

⚠️ Downloads as an unencrypted PKCS#8 file. Anyone with this file can use the key — move it to a secure keystore immediately.

About this tool

This tool generates an RSA signing key pair (RSASSA-PKCS1-v1_5 with SHA-256) locally in your browser using the Web Crypto API. The public key is exported as SPKI PEM and the private key as unencrypted PKCS#8 PEM, formats accepted by many cryptographic libraries and OpenSSL-based workflows. Because this is a signing key pair, it is suitable for RS256-compatible JWT signing workflows — not for RSA encryption. The downloaded private key is not passphrase-protected, so protect it immediately. Best suited to testing and controlled workflows; production keys belong in an approved key-management system or hardware security module.

How to use it

What Is an RSA Key Generator?

RSA is a public-key cryptosystem in which a key pair is used for signing and verification or for encryption and decryption, depending on the scheme. This tool generates an RSASSA-PKCS1-v1_5 signing key pair with SHA-256 and a 65537 public exponent, with key usages restricted to sign and verify. It is therefore suitable for RS256-compatible JWT signing and similar signature workflows. It is not an RSA-OAEP encryption key pair and cannot be used for RSA encryption or decryption.

The public key is exported in SPKI PEM format with BEGIN PUBLIC KEY headers, and the private key in unencrypted PKCS#8 PEM format with BEGIN PRIVATE KEY headers. Many cryptographic libraries accept these formats, but SSH clients, legacy software, and some server products may require conversion to OpenSSH, PKCS#1, JWK, or another application-specific format. The unencrypted private key file must be protected immediately: anyone who obtains it may be able to use it. Do not commit private keys to source control or include them in logs, container images, or client-side applications.

How to use it

  1. Select a key size: 2048-bit (Broad Compatibility) for the widest support, 3072-bit (Higher Security Margin) as a middle ground, or 4096-bit (Larger and Slower) for the maximum margin at the cost of slower generation and larger signatures.
  2. Click "Generate New RSA Key Pair" and wait for generation to complete.
  3. Use "Copy" or "Download" for the public key (SPKI PEM), which is safe to share.
  4. Download the private key only if necessary. The exported PKCS#8 file is not passphrase-protected, so move it immediately to an approved protected location and avoid copying it through the system clipboard.

Why use this over alternatives

This utility generates an RSASSA-PKCS1-v1_5 signing key pair locally through the browser's Web Crypto API and exports standard SPKI and PKCS#8 PEM formats. It is intended for testing, learning, and controlled signing workflows. For production keys, use an approved key-management system, hardware security module, or trusted platform process.

Questions

In what format are the keys exported?
The public key is exported in SPKI PEM format with BEGIN PUBLIC KEY headers. The private key is exported in unencrypted PKCS#8 PEM format with BEGIN PRIVATE KEY headers. Many cryptographic libraries support these formats, but SSH clients, legacy software, and some server products may require conversion to OpenSSH, PKCS#1, JWK, or another application-specific format.
Is the downloaded private key protected by a passphrase?
No. The exported BEGIN PRIVATE KEY file is an unencrypted PKCS#8 private key. Anyone who obtains it may be able to use it. Store it with restrictive file permissions, import it immediately into an approved secret manager or encrypted keystore, and do not commit it to source control or share it.
Can I use these keys for SSH authentication?
Not directly in every SSH client. The exported SPKI public key is not the text format normally used in an OpenSSH authorized_keys file, and the PKCS#8 private key may not be accepted by every SSH client. Convert the key pair to the exact OpenSSH format your environment requires, then verify the public-key fingerprint before deployment.
Is my private key sent to your servers?
Key generation and PEM export are performed in the browser using the Web Crypto API. However, browser-based generation does not protect against malicious extensions, compromised devices, clipboard history, third-party scripts, or an altered copy of the webpage. Avoid generating production private keys on shared or untrusted devices. The API also requires a secure context, normally HTTPS.

Related tools

All security tools