Crypto & Security

RSA Key Generator

Generate standard RSA public and private key pairs as PEM text with key sizes of 2048, 3072, or 4096 bits.

Run tool

Generate standard RSA public and private key pairs directly in text format for development, testing, and cryptographic setup tasks. The generator creates a matched pair of cryptographic keys using the standard public exponent of 65537. You can select among three supported key lengths: 2048 bits, 3072 bits, or 4096 bits. When no specific size is specified, the generator defaults to standard 2048-bit key generation. After you run the tool, the output provides both the public key and the private key formatted as standard PEM text blocks. The private key is output in unencrypted PEM format, making it straightforward to import into configuration files, local test runners, API clients, or SSH key management setups. If you enter an unsupported key length outside the supported values of 2048, 3072, or 4096, the tool reports an error requesting a valid bit length. Use the generated key pair whenever you need quick public-private pairs for sandbox environments and software integration.

Instructions

  1. Enter a supported key size (2048, 3072, or 4096) or leave the field blank to use the default 2048-bit size.
  2. Click the button to generate the RSA key pair.
  3. Copy the generated public and private PEM text blocks for use in your application.

Examples

  • Generate a default 2048-bit RSA key pair by leaving the Key Size field blank and clicking Run.
  • Specify 4096 in the Key Size field to create a larger 4096-bit RSA public and private key pair.

FAQ

Which RSA key sizes are supported?

The generator supports key lengths of 2048, 3072, and 4096 bits. Any other value results in an error.

Is the generated private key encrypted with a passphrase?

No. The private key is returned as an unencrypted PEM text block.

What public exponent is used for the key pair?

All key pairs generated by this tool use the standard public exponent 65537.

What format are the generated keys in?

Both the public key and the private key are provided as standard PEM-formatted text blocks.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.