RSA Key Pair Generator

Runs locally in your browser

Generate RSA public and private keys as PEM in your browser

Key size (bits)

Larger keys are stronger but slower to generate.

Advanced
Purpose
Hash

Public exponent is fixed at 65537.

Private key (PKCS#8 PEM)

Sensitive
The private key is sensitive. Anyone who obtains it can act as that key holder. Generation happens locally and the key is not saved by CodingTool.

Public key (SPKI PEM)

Choose options, then select Generate key pair.

Keys are generated in your browser and are never saved, logged or sent.

About RSA key pairs

This tool creates RSA key pairs with the Web Crypto API built into your browser. Choose 2048, 3072 or 4096 bits; 2048 is the default. The public key is exported as SPKI PEM (BEGIN PUBLIC KEY) and the private key as PKCS#8 PEM (BEGIN PRIVATE KEY), the formats most libraries and servers accept. Under Advanced you can generate a key for encryption (RSA-OAEP) or signing (RSA-PSS) with SHA-256, SHA-384 or SHA-512. The public exponent is always 65537.

How to use

Choose a key size, optionally open Advanced to pick the purpose and hash, then select Generate key pair. Generation can take a few seconds for larger keys. Copy or download each key separately as public-key.pem and private-key.pem. Changing an option or selecting Clear removes the current keys.

Security and privacy

Keys are generated on your device and stay in page memory only. CodingTool does not save, log or send them, and they disappear when you clear the tool or leave the page. Store the private key in a secret manager or protected file, and share only the public key.

CodingTool is officially live on

Launched on StartupBaseCodingTool.dev - Free, Fast & Easy Developer Tools in One Place | Product HuntCodingTool - Featured on Startup FameFazier badgeListed on Turbo0Featured on Twelve ToolsFeatured on Findly.tools