Developer ToolsGeneratorsFree Tool
Private Key Generator
Generate a real RSA-2048 or ECDSA P-256 key pair (PEM-encoded) directly in your browser using the Web Crypto API.
How to Use Private Key Generator
- 1Optionally type 'ecdsa' for an ECDSA P-256 key (defaults to RSA-2048)
- 2Click Process
- 3Copy the PEM-encoded private and public key immediately — nothing is saved
Frequently Asked Questions
Real — generated using crypto.subtle.generateKey, the browser's native, standards-compliant key generation, then exported as genuine PKCS8 (private) and SPKI (public) PEM blocks.
It defaults to RSA-2048. Type 'ecdsa' anywhere in the input field to generate an ECDSA P-256 key pair instead.
No — it exists only in your browser's memory during generation and is never sent to any server or persisted. Copy it immediately; refreshing or navigating away loses it permanently.
For genuinely sensitive production keys (especially long-lived ones like a root CA or server TLS key), generating with a well-audited offline tool like OpenSSL is generally preferred — this browser tool is convenient for testing, development, or learning.
Related Tools
UUID Generator v4
Generate a random RFC 4122 version 4 UUID with the version and variant bits set correctly.
UUID Generator v1
Generate a real RFC 4122 version 1 (time-based) UUID, encoding the current timestamp plus a randomly-generated node identifier.
NanoID Generator
Generate a cryptographically random, URL-friendly ID using the same 21-character length and default alphabet as the popular nanoid library.
ULID Generator
Generate a real, spec-compliant ULID — a 26-character, lexicographically sortable ID with a Crockford base32-encoded timestamp and random suffix.