Public Key Extractor — Derive Public Key from Private Key (RSA & EC)
Paste an RSA or EC private key (PEM PKCS#8 or JWK) and instantly extract the matching public key in PEM (SPKI), JWK, or DER format. Perfect for publishing a JWKS endpoint, verifying a token against a private-key-only backup, or distributing a public key to peers. 100% local — the private key never leaves your browser.
Last updated:
CommentsEverything runs in your browser via the Web Crypto API. The private key is used only to derive the public key locally and is never transmitted.
Frequently Asked Questions
Why would I need to extract a public key from a private key?
A few common scenarios: (1) You generated a private key on a server and now need to publish the public key at a JWKS endpoint so clients can verify tokens. (2) You have a private-key backup but lost the corresponding public key file. (3) You're distributing the public key to a peer for signature verification or hybrid encryption. Every private key contains all the information needed to derive its public key — it's a one-way but mechanical operation.
Which input formats are supported?
Both PEM PKCS#8 (-----BEGIN PRIVATE KEY-----) and JWK JSON. For PEM, the tool auto-detects whether the key is RSA or EC by trying each algorithm. Legacy openssl 'RSA PRIVATE KEY' (PKCS#1) is not supported directly — convert it with: openssl pkcs8 -topk8 -nocrypt -in old.pem -out new.pem.
Is the private key sent to any server?
No. The extraction runs entirely in your browser via the Web Crypto API. You can verify with your browser's DevTools Network panel — clicking Extract produces zero network traffic. The private key exists only in this tab's memory and is destroyed when you close it.
What formats does the tool output the public key in?
Four formats, toggleable: PEM (SPKI, the -----BEGIN PUBLIC KEY----- form used by openssl / Node / Go / Python), JWK (JSON form used by JWTs and browsers), DER · hex, and DER · base64 (raw bytes for low-level inspection). Copy whichever your target system expects.
Can I verify that the extracted public key matches the private key?
Yes, and you should whenever it matters. Use our RSA Encrypt & Decrypt or ECDSA Sign & Verify tools: encrypt something with the extracted public key and decrypt with the original private key (or sign with the private key and verify with the extracted public key). If both succeed, the pair matches.
Try Next
AES Encrypt / Decrypt
Encrypt and decrypt text with AES (128 / 192 / 256, GCM authenticated or CBC legacy) using a password. PBKDF2 key derivation with 200,000 iterations. 100% local — the Web Crypto API runs entirely in your browser.
Related Tools
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes of any text online. Free, no signup — all hashing runs entirely in your browser via the Web Crypto API, so nothing is uploaded.
HMAC Generator
Compute HMAC signatures with SHA-1, SHA-256, SHA-384, or SHA-512 online. Verify API requests, sign webhooks, and authenticate messages. Free, no signup — signing runs locally via the Web Crypto API, secrets never leave your browser.
JWT Decoder
Decode JSON Web Tokens (JWT) to inspect the header, payload, and signature. Runs entirely in your browser — tokens are never sent to any server.
SHA-1 Generator
Generate SHA-1 (160-bit) hashes of any text or file online. Drag-and-drop file support for GB-scale checksums via Web Crypto API. Verify against a known SHA-1 in one click. 100% local.
SHA-256 Generator
Compute SHA-256 (256-bit) hashes of text or files instantly online. The gold-standard cryptographic hash for signatures, blockchain, and integrity. Drag-and-drop file support; verify against a known SHA-256 in one click. 100% local.
SHA-512 Generator
Compute SHA-512 (512-bit) hashes of text or files instantly online. Provides higher security margin than SHA-256 and is faster on 64-bit hardware. Drag-and-drop file support; verify with one click. 100% local.