0
0

RSA Key Generator

Egor VolchenkoEgor Volchenko
CreatedDec 3, 2026
UpdatedDec 3, 2026

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.

RSA Key Size:
1
1

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. 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. Click Generate RSA Key Pair and wait until both output fields contain complete PEM keys.
  3. 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. Use Copy Private Key or Copy Public Key for the matching output. Preserve the BEGIN and END lines and all line breaks.
  5. 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

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.

API — RSA PEM Key Pair

Automate this tool directly from your scripts, CI/CD pipelines, or backend applications via HTTP POST.

No API Key Required 60 req/min
https://million.tools/api/v1/run/rsa-key-generator

Request Parameters (JSON / Form Data)

  • key_size

    Key size

    2048 4096 3072 1024
    Type: string Default: 2048
bash — cURL
curl -X POST https://million.tools/api/v1/run/rsa-key-generator \
  -H "Content-Type: application/json" \
  -d '[]'
const response = await fetch('https://million.tools/api/v1/run/rsa-key-generator', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify([]),
});

const data = await response.json();
console.log(data.result);
import requests

response = requests.post(
    'https://million.tools/api/v1/run/rsa-key-generator',
    json={
    
    },
    timeout=15,
)

data = response.json()
print(data['result'])
$ch = curl_init('https://million.tools/api/v1/run/rsa-key-generator');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
    
    ]),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);

echo $response['result'] ?? '';
{
    "status": "success",
    "tool": "rsa-key-generator",
    "service": "rsa_key_generator",
    "result": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7cKbS1CQKKgHw\niLELZP3hdtXmB7J3azp1fgFHg5NncIKolEJNY1m8TDv9Xizbm9mDxhmElzFWn2UJ\nhqpSRXThdXWICUJEm6fFP8nAXga/IHQ/CUCmTOPw4JWrIAImF67sDoBHVeCHWAR7\n1z7YlB/pd5JSMWcF0IMrjEpl3wHal7YH+Ag1xjXSxEk3SMtdraDqmCSZYZLjEDDG\n8OOm+fJE9lsCTQTbfUa3JRyQvA4aV4Uk3gfR4aGqntVtSAbuN0vlb+JgDWFOplVP\n1QI89pbFORSQASSJF/pxqAmXwVabni+MZKfXaNOwQn/b5MKaoNC7Pyv5wVVQSqhM\nWhfOjHzTAgMBAAECggEATocBFSW0XZ/AxUV3KudqJ8nSDjeeUMKXML8UCSJ6IGV2\nD+thJavgXe9wWJNaZr0R8U+OxEpVbM2FlmqZM7OOpqA/l7kNTtIJhS1WuGWMHQmb\nOgeF0sY23uUwPwu/arcUXSgsHPbBBOLeqgWA+lqATh7+qbmxyDFVqupxBuHZlHq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qDQuz8r+cFVUEqoTFoXzox8\n0wIDAQAB\n-----END PUBLIC KEY-----\n"
    }
}
Egor Volchenko
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.

Published:
Updated:

Ratings & feedback 0

Share your experience with this tool.

Leave feedback

Your rating (optional)

Select a rating

Write a review, leave a rating, or do both.

Your email stays private.

No feedback yet

Be the first to leave a review or rating.