# RSA Key Generator > Use this RSA key generator to create a PEM key pair. Choose an RSA key size and copy PKCS#8 private and SPKI public keys. This **RSA key generator** creates a public and private key pair for testing signature integrations. Select an RSA key size and copy the unencrypted private key as PKCS#8 PEM and the public key as SPKI PEM. The current page also calls a remote API, so use disposable keys rather than production credentials. ## Overview & Metadata - **Canonical URL:** https://million.tools/rsa-key-generator/ - **Markdown Copy (.md.txt):** https://million.tools/rsa-key-generator.md.txt - **Plain Text Copy (.txt):** https://million.tools/rsa-key-generator.txt - **API Endpoint:** https://million.tools/api/v1/run/rsa-key-generator (POST, Keyless, 60 req/min) - **SEO Title:** RSA Key Generator Online | PKCS#8 and SPKI PEM - **Alternative Names:** RSA PEM Key Pair, RSA Public and Private Keys, RSA key pair generator, RSA PEM key generator, RSA public key generator, RSA private key generator - **Category:** [Cryptography](https://million.tools/cryptography/) - **Tags:** [#RSA](https://million.tools/tag/rsa/) - **Application Category:** `DeveloperApplication` - **Platform:** Web (All modern desktop and mobile browsers, requires JavaScript) - **Price:** Free ($0.00 USD, no registration or sign-up required) - **Live Calculation:** Supported (`Auto / Live` toggle enabled by default) - **Usage Statistics:** 3 uses · 10 views - **Published:** 2026-12-03 - **Last Updated:** 2026-12-03 - **Author:** Egor Volchenko (Developer & Author) ## Key Features - Generate a public and private test key pair - Select 1024, 2048, 3072, or 4096 bits - Display unencrypted PKCS#8 private PEM - Display SPKI public PEM - Copy each key separately - Clear displayed key text ## Parameters & Interface Controls ### Input Parameters & Options - `key_size`: `2048 bits (Standard)` | `4096 bits (High Security)` | `3072 bits` | `1024 bits (Legacy)` ### Output Fields & Metrics - `result`: Private Key (PKCS#8 PEM). - `public_key`: Public Key (SPKI PEM). - **Controls:** `Generate RSA Key Pair`, `Clear`, `Copy Private Key`, `Copy Public Key`, `Fill test data`, `Auto / Live` ## Interactive Example (Test Vector) **Settings:** - Option: `2048 bits (Standard)` **Private Key (PKCS#8 PEM):** ```text -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG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ym8MW vDTE+7qN+wKBgQDfQLivXFrZlwVA/G2fP/s66BKaxWnmgl0PL+X5H2gaTPxTo6aO r2ZqIbB/WpzcIQmBjc2PsHeDDdh9DXg692JS8gtl9zsXUWsAysnO2PZcsqqecT4r 6UWA1wSEIRh6bmJBpaEQvY8T/h5LdH901IIRVwas9suyzF4ttPZtLfm4WQKBgETY ZfevUHxEZTCMuHRYAD/PXwS7msJIGxJjAXWV4P7fGx8ZbfR680R0dwNDs2topBUr aUerZgjyKccjfHg/zKoeeaOAU08PXCHyzpOG13MTnTrS6lhe/xc+fPCX2WopCfsZ 4839Q9mMDfmruGkEkab8I3KYrsW4/Ts+NR+euIaBAoGBAIi/2u66HEZawsuWGijV a9CZGPJJsmCIzYc/xs3xBw0J+wIxg6VojwnKLshRFTO70CcjBeA10J06vERcoezD AKZ/DVAiyCk+CCvB0Rpj5VQWRu+RE7XENdZ7Cxxm/a4+no1w+qwzJuxncnW6kPqG v956n1gHR+N2L+nng9jBEl+X -----END PRIVATE KEY----- ``` **Public Key (SPKI PEM):** ```text -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu3Cm0tQkCioB8IixC2T9 4XbV5geyd2s6dX4BR4OTZ3CCqJRCTWNZvEw7/V4s25vZg8YZhJcxVp9lCYaqUkV0 4XV1iAlCRJunxT/JwF4GvyB0PwlApkzj8OCVqyACJheu7A6AR1Xgh1gEe9c+2JQf 6XeSUjFnBdCDK4xKZd8B2pe2B/gINcY10sRJN0jLXa2g6pgkmWGS4xAwxvDjpvny RPZbAk0E231GtyUckLwOGleFJN4H0eGhqp7VbUgG7jdL5W/iYA1hTqZVT9UCPPaW xTkUkAEkiRf6cagJl8FWm54vjGSn12jTsEJ/2+TCmqDQuz8r+cFVUEqoTFoXzox8 0wIDAQAB -----END PUBLIC KEY----- ``` ## How to use RSA Key Generator Choose parameters for a disposable key pair, then keep the two PEM outputs together. ### Create a RSA test key pair 1. **Choose the key parameters:** Select 2048 bits (Standard), 4096 bits (High Security), 3072 bits, or 1024 bits (Legacy) under RSA Key Size: Match the setting required by your test integration. 2. **Generate a fresh pair:** Click Generate RSA Key Pair and wait until both output fields contain complete PEM keys. 3. **Check both outputs:** Read Private Key (PKCS#8 PEM) and Public Key (SPKI PEM) together. A new generation replaces the pair; wait for both fields to settle before copying. 4. **Copy the required key:** Use Copy Private Key or Copy Public Key for the matching output. Preserve the BEGIN and END lines and all line breaks. 5. **Clear the displayed keys:** Use Clear where shown or the field clear controls to remove the displayed text. Clearing the form does not revoke keys or remove copies held elsewhere. Choose `2048 bits (Standard)` and click *Generate RSA Key Pair*. The private output begins with `-----BEGIN PRIVATE KEY-----` and the public output begins with `-----BEGIN PUBLIC KEY-----`. The actual key bytes change with each generation. ### Understand the two PEM containers PKCS#8 carries the private key; SPKI carries the public key. PEM wraps those binary structures in Base64 with BEGIN and END lines. A public key can be distributed to verifiers, while its private counterpart must remain controlled. These containers are different from an OpenSSH authorized_keys line. ### Match the modulus size to the receiving system The modulus size describes the RSA key, not the size of the PEM text. The 1024-bit option is explicitly marked Legacy and should be limited to compatibility tests. A bigger modulus usually takes longer to generate; it does not change the output container. ## Frequently asked questions ### What does the RSA key pair contain? The private key contains the secret material needed to create RSA signatures, and the public key allows a receiving system to verify them. This generator creates keys; it does not sign a message or issue a certificate. ### Can I encrypt the private key with a passphrase? No passphrase field is available in this page. The displayed PKCS#8 private PEM is unencrypted. Backend options mentioned elsewhere do not create a passphrase setting in this interface. ### Can I choose Hex, Base64, or another key format? The page exposes fixed PKCS#8 PEM private and SPKI PEM public outputs. It has no output-format or PKCS selector. Base64 inside PEM is part of the container, not a separate format option. ### Can I use the public key as an SSH key? The public output is SPKI PEM. An SSH service usually expects the OpenSSH public-key representation, so this text cannot simply be pasted as an authorized_keys entry. No SSH conversion control is provided here. ### Why did the output change without another copy action? Opening the page generates a pair. Clicking Generate starts browser generation and also the shared API request, so a response may replace what is shown. Wait until both outputs settle, then keep the private and public keys from that same result. ### Are these keys generated only on my device? The page creates an initial pair with Web Crypto, but its shared Generate handler also calls the API and includes any keys already displayed. The API can replace both outputs. Use disposable test keys here; this page does not provide an exclusively local key-generation workflow. ## Related Tools - [ChaCha20 Encryption](https://million.tools/chacha20-encrypt/): Encrypt pasted data with ChaCha20 and a raw key. Copy the complete Hex or Base64 payload, including its generated prefix. - [ChaCha20 Decryption](https://million.tools/chacha20-decrypt/): Decrypt a complete ChaCha20 payload with the matching raw key. Enter Hex or Base64 ciphertext and view the restored UTF-8 text. - [AES Encryption](https://million.tools/aes-encryption/): Encrypt text or encoded bytes with AES-256-CBC. Supply a key and copy Hex or Base64 output containing the random IV followed by the ciphertext. - [AES Decryption](https://million.tools/aes-decryption/): Decrypt compatible AES-256-CBC ciphertext from Base64 or Hex. Supply the matching key and retain the 16-byte IV prefix to recover the plaintext. ## About the Author **Egor Volchenko** — *Developer & Author* Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience. - **Links:** [x.com](https://x.com/egorleet) · [github.com](https://github.com/egorleet) · [t.me](https://t.me/egorleet) · [instagram.com](https://www.instagram.com/egorleet) · [facebook.com](https://www.facebook.com/egorleet/) · [egorleet.blog](https://egorleet.blog/) · [mastodon.social](https://mastodon.social/@egorleet) · [twitch.tv](https://www.twitch.tv/egorvolchenko) · [stackoverflow.com](https://stackoverflow.com/users/31679135/egor-volchenko) · [reddit.com](https://www.reddit.com/user/Vegetable_Window9185/) · [youtube.com](https://youtube.com/@egor-volchenko)