Your files never leave your device. All processing happens locally in your browser.
How do I generate a public/private key pair online for free without uploading anything?
Open the PGP / Asymmetric Key Generator, choose a scheme (Ed25519, ECDSA or RSA for signing; X25519, ECDH or RSA-OAEP for encryption) and click Generate. The browser’s native Web Crypto API mints a real key pair from the operating-system CSPRNG and exports the public key as SPKI PEM + JWK and the private key as PKCS#8 PEM + JWK, plus a SHA-256 fingerprint — all locally, with nothing uploaded. Note: these are standard PEM/JWK keys, not OpenPGP <code>.asc</code> keys.
Six algorithms: Ed25519, ECDSA (P-256/384/521), RSA-PSS / PKCS#1 v1.5 for signing; X25519, ECDH, RSA-OAEP for encryption
Public key exported as SubjectPublicKeyInfo (SPKI) PEM + JWK; private key as PKCS#8 PEM + JWK
SHA-256 fingerprint of the SPKI DER, shown as OpenSSH SHA256:base64 and colon-hex
Not OpenPGP: no user-ID, no armor, no web of trust — use GnuPG / Kleopatra, Mailvelope or Proton Mail for PGP email
100% client-side via crypto.subtle.generateKey — keys never leave your browser
What is
Asymmetric key pair (public-key cryptography)
An asymmetric key pair is a mathematically linked public key (shareable) and private key (secret): the public key verifies signatures or encrypts to the owner, while only the matching private key can sign or decrypt. This tool generates such pairs entirely in the browser with the Web Crypto API — RSA, ECDSA/ECDH over NIST curves, or Ed25519/X25519 over Curve25519 — and exports them as standard SPKI/PKCS#8 PEM and JWK. These are the encodings used by TLS, SSH, JOSE/JWT and OpenSSL, and are distinct from the OpenPGP <code>.asc</code> format used for PGP email.
Security & Privacy
Related terms
public keyprivate keyEd25519X25519ECDSAECDHRSASPKIPKCS#8JWKPEMfingerprintOpenPGPWeb Crypto API
Frequently Asked Questions
No. They are standard PEM/JWK keys, not OpenPGP .asc keys, so they will not import into GnuPG or a mail plugin.
This tool generates standard asymmetric key pairs in SPKI (public) and PKCS#8 (private) PEM plus JWK — the encodings used by Web Crypto, OpenSSL and JOSE/JWT. It does not build the OpenPGP packet format: there is no user-ID, no expiry or subkeys, no ASCII-armored <code>.asc</code> block and no web of trust, so you cannot import these into GnuPG / Kleopatra, Mailvelope or a mail plugin for PGP email. For true end-to-end encrypted email or file signing with PGP, use GnuPG (gpg), Kleopatra, Mailvelope or Proton Mail. Use this tool for app-level crypto: JWT/JWS signing keys, JWE, TLS/mTLS experiments, ECDH/X25519 key agreement, SSH-style identities and learning how the algorithms differ.
Entirely in your browser. The private key is never uploaded, logged or stored on a server.
Every key pair is minted on your device by the browser’s native Web Crypto API (crypto.subtle.generateKey), which draws its randomness from the operating-system CSPRNG — never Math.random. The public key, private key, PEM, JWK and SHA-256 fingerprint are all computed locally; there is no fetch, no upload, no logging and no CDN in the crypto path, and even the Ed25519 fallback library is bundled locally rather than loaded from a network. Closing the tab discards every key from memory, and the tool works offline once cached. The only optional network use anywhere on the site is consent-gated ads, which never see your keys.
Prefer Ed25519 (signing) or X25519 (encryption) for new systems; use ECDSA/ECDH or RSA for compatibility.
For new work, Ed25519 (signing) and X25519 (key agreement) are the modern recommendation — tiny 32-byte keys, fast, and safe by default. ECDSA and ECDH over P-256/P-384/P-521 are compact and widely supported (JWT ES256, TLS, ECDH-ES). RSA is the most universally compatible (JWT RS256, legacy systems) but larger and slower: if you use it, 2048-bit is today’s minimum, 3072-bit or more is recommended for long-term keys, and RSA-PSS / RSA-OAEP are preferred over the older PKCS#1 v1.5 schemes. Signing keys prove authenticity; encryption / key-agreement keys protect data — a key is generated for one job, so pick the purpose first.
You get SPKI/PKCS#8 PEM and JWK plus a SHA-256 fingerprint. The private key is exported unencrypted, so protect it.
The public key is exported as SubjectPublicKeyInfo (SPKI) PEM and JWK; the private key as PKCS#8 PEM and JWK; and a SHA-256 fingerprint of the SPKI DER is shown as both OpenSSH-style SHA256:base64 and colon-separated hex. The private-key panel is warning-styled and blurred until you reveal it so you do not leak it by accident. Because the PKCS#8 export is unencrypted, add a passphrase with your own tooling (for example <code>openssl pkcs8 -topk8 -v2 aes-256-cbc</code>) before storing it, keep it in a secrets manager, and never paste it into a chat, a commit or a screenshot. For production or long-term keys, generate them in vetted tooling or an HSM / KMS so the private key never touches a browser.
Detailed Explanation
📖How It Works
What This Tool Generates
The PGP / Asymmetric Key Generator produces real public/private key pairs entirely in the browser using the Web Crypto API. It offers six schemes: Ed25519, ECDSA and RSA (RSA-PSS or RSASSA-PKCS1-v1_5) for signing, and X25519, ECDH and RSA-OAEP for encryption / key agreement. The public key is exported as SubjectPublicKeyInfo (SPKI) PEM and JWK, the private key as PKCS#8 PEM and JWK, alongside a SHA-256 fingerprint of the SPKI DER. Critically, these are standard PEM/JWK keys — NOT OpenPGP “.asc” armored keys.
Public key as SPKI PEM + JWK; private key as PKCS#8 PEM + JWK
SHA-256 fingerprint of the SPKI DER (OpenSSH SHA256:base64 and colon-hex)
Standard encodings for Web Crypto, OpenSSL and JOSE/JWT — not OpenPGP
Real Web Crypto keys from the OS CSPRNG, 100% client-side
⚙️Methodology
How the Keys Are Made and Exported
A pure engine (asymmetricKeyEngine.ts) calls crypto.subtle.generateKey with the algorithm parameters for the chosen scheme — for RSA the F4 public exponent 65537 with the selected modulus and hash, for ECDSA/ECDH a named curve (P-256/P-384/P-521), and for Ed25519/X25519 the fixed Curve25519 parameters. The resulting extractable pair is exported four ways (SPKI, PKCS#8, and JWK for public and private), and a SHA-256 digest of the SPKI DER is formatted as the fingerprint. If a browser lacks native WebCrypto Ed25519, the audited @noble/ed25519 library (bundled locally) mints the pair and the engine encodes it per RFC 8410.
crypto.subtle.generateKey seeds from the operating-system CSPRNG (never Math.random)
RSA uses the standard F4 exponent 65537; EC uses NIST named curves
Exported as SPKI (public) and PKCS#8 (private) DER, wrapped as RFC 7468 PEM, plus RFC 7517/8037 JWK
Fingerprint = SHA-256 over the exact SPKI DER bytes
Ed25519 fallback via @noble/ed25519 with RFC 8410 DER encoding
🔧Technical Details
Algorithms and Encodings
Signing keys prove authenticity (sign/verify); encryption and key-agreement keys protect data (encrypt/decrypt or deriveKey/deriveBits). RSA follows RFC 8017 (PSS/PKCS#1 v1.5 signatures, OAEP encryption); ECDSA and ECDH use FIPS 186-4 / SEC 1 curves; Ed25519 and X25519 follow RFC 8032 and RFC 7748 over Curve25519. Public keys are encoded as X.509 SubjectPublicKeyInfo (RFC 5280) and private keys as PKCS#8 (RFC 5958), the same encodings used by TLS, SSH, OpenSSL and JOSE. This is deliberately distinct from the OpenPGP packet/armor format (RFC 4880).
RSA-PSS / PKCS#1 v1.5 / OAEP — RFC 8017
ECDSA / ECDH over P-256 / P-384 / P-521 — FIPS 186-4 / SEC 1
Ed25519 / X25519 over Curve25519 — RFC 8032 / RFC 7748, encoded per RFC 8410
Not the OpenPGP format (RFC 4880) — no user-ID, armor or web of trust
⚠️Limitations
Honest Limitations
These are not OpenPGP keys: they have no user-ID, no expiry/subkeys, no ASCII-armored .asc block and no web of trust, so they cannot be imported into GnuPG/Kleopatra or a mail plugin for PGP email — for that use GnuPG, Mailvelope or Proton Mail. The PKCS#8 private key is exported UNENCRYPTED, so it must be passphrase-protected with your own tooling before storage. A browser tab is not a hardware security module: a compromised device, malicious extension or XSS flaw could read a key from memory. For new systems prefer Ed25519/X25519 or ECDSA/ECDH over RSA; if using RSA, 2048-bit is the floor and 3072+ is recommended for long-term keys. This is a convenience/learning generator, not a key-management system.
Not OpenPGP — cannot be used for PGP email or imported into GnuPG
Private key is exported unencrypted; add a passphrase before storing it
A browser tab is not an HSM — malware, extensions or XSS are the real risk
Prefer EC / Ed25519 over RSA for new work; RSA 2048-bit floor, 3072+ long-term
A leaked private key must be rotated — it cannot be un-leaked
🔒Privacy & Security
Private by Design
Every key pair is minted on the user’s device by the browser’s native Web Crypto API, seeded by the operating-system CSPRNG. The private key, public key, PEM, JWK and fingerprint are computed locally — there is no fetch, no upload, no logging, no server and no CDN in the crypto path, and even the Ed25519 fallback library is bundled locally rather than fetched from a network. Nothing is persisted: keys live only in the tab’s memory and are erased when the tab closes. The tool works offline once cached, supports dark mode and a mobile-first layout, and has no analytics or telemetry; the only optional network use anywhere on the site is consent-gated ads, which never see the keys.
Key generation runs locally via crypto.subtle.generateKey — nothing uploaded
No server, no CDN, no logging, no telemetry, no account
Keys live only in tab memory and are erased on close
Works offline once cached; dark-mode and mobile-first
Only optional network use is consent-gated ads that never see the keys
Choosing an algorithm
Scheme
Type
Key size
Best for
Notes
Ed25519
EdDSA signing
32-byte
New signing keys
Fast, modern, safe default; the recommended choice
X25519
ECDH key agreement
32-byte
New encryption
Curve25519 Diffie-Hellman; pair with Ed25519
ECDSA / ECDH
NIST EC
P-256/384/521
JWT ES256, TLS, ECDH-ES
Compact and widely supported
RSA-PSS / OAEP
RSA
2048–4096-bit
JWT RS256, legacy systems
Larger and slower; PSS/OAEP preferred over PKCS#1 v1.5
All schemes are generated with the Web Crypto API from the OS CSPRNG. These are PEM/JWK keys, not OpenPGP .asc keys. Everything runs locally in the browser; nothing is uploaded. As of July 2026.