How to use the RSA Key Generator tool
- Choose the key type and size.
- Choose the private key format.
- Click “Generate key pair”.
- Copy or download the public and private key.
Which key should I choose?
- RSA 2048: the minimum accepted today, fast and compatible with everything.
- RSA 3072 or 4096: more security margin, slower to generate and use.
- ECDSA P-256: the same security as RSA 3072 with much smaller keys and faster signatures. Supported by all modern TLS and JWT libraries (ES256).
Formats
The public key is in SubjectPublicKeyInfo PEM (BEGIN PUBLIC KEY), which OpenSSL, Node.js, Java, Python and Go read directly. The private key can be PKCS#8 (BEGIN PRIVATE KEY) or the older PKCS#1 / SEC1 format (BEGIN RSA PRIVATE KEY / BEGIN EC PRIVATE KEY) that some tools still expect. The public key is also shown as JWK for web applications.
Security
Keys come from the Web Crypto API, the same secure random generator your browser uses for HTTPS. For production servers, many teams still prefer to generate keys on the machine where they will be used, so the private key is never copied. Everything runs in your browser. Your files and text are not uploaded to our server or stored anywhere.
Typical uses
- Signing and verifying JWTs (RS256 or ES256) in development and testing.
- Creating a CSR for a TLS certificate with OpenSSL.
- Encrypting small secrets or testing encryption code.
- Configuring services that ask for a public key in PEM or JWK format.
Storing private keys
Keep private keys out of source code and repositories. Store them in a secrets manager, an environment variable on the server or an encrypted file, and rotate them if they might have been exposed. The public key can be shared freely.
Frequently asked questions
Is it safe to generate keys in a browser?
The Web Crypto API uses the operating system’s secure random source, and the key never leaves this page. Close the tab when you are done.
How do I use the key with OpenSSL?
Save the private key as private.pem, then for example: openssl req -new -key private.pem -out request.csr.
Can I add a passphrase?
Not here. You can encrypt the key afterwards with: openssl pkey -in private.pem -aes256 -out private-enc.pem.
Why does 4096-bit take longer?
Finding large prime numbers takes more work. A few seconds is normal.
Can I use these keys for SSH?
Use the SSH Key Generator instead: it creates keys in the OpenSSH format that servers and Git hosts expect.
Is the key sent to your server?
No. The key pair is generated in your browser.
