/ Free Tools — DKIM Key Generator
Your private key, born in your browser.
Generate an RSA or Ed25519 DKIM key pair with the Web Crypto API, entirely on this page — the private key never leaves your browser and no request is made. Get the private key and the exact DNS record, then watch a live demo sign, verify, and break to prove what DKIM protects.
Generated locally with the Web Crypto API. The private key never leaves your browser — watch the network tab, no request is made.
/ What this does
DKIM works with a key pair: a private key that signs your outgoing mail and a matching public key you publish in DNS so receivers can verify the signature. This tool generates that pair with the Web Crypto API entirely in your browser — RSA-2048, RSA-4096, or Ed25519 — so the private key is created and stays on this page and no request is ever made. You get the private key to load into your mail server and the exact DNS record to publish, and then a live demonstration signs a sample message, verifies it against the public key, and breaks the signature when you tamper with the text — the clearest way to see what DKIM actually protects.
Because generation is local, this is a privacy-first alternative to server-side generators that necessarily see your key. For a production server the most defensive practice is still to generate on the server itself, and the tool says so plainly rather than pretending otherwise — but for testing, staging, learning, and dual-signing setups, generating here is both safe and fast. The output links straight to the DKIM checker so you can confirm the published record once it's live.
-
Never transmitted
The private key is generated with the Web Crypto API and stays in the page. No key, message, or domain is sent to us — verifiable in your network tab.
-
RSA + Ed25519
RSA-2048 for universal support, RSA-4096 for strength, Ed25519 for the modern profile — generate one of each for dual signing.
-
Record, ready
The DNS TXT record comes ready to publish, both single-line and pre-split for panels that don't split long records themselves.
-
See it work
The sign-verify-tamper demo turns an abstract key pair into something you can watch pass, then fail the moment the message changes.
/ How signing works
How does a key pair prove a message is genuine?
The two keys are mathematically linked and do opposite jobs. Your mail server holds the private key and uses it to sign each outgoing message — the signature is a hash of the headers and body, encrypted with the private key, attached as the DKIM-Signature header. The public key lives in your DNS, and any receiver can fetch it to check that signature. Only the private key could have produced a signature the public key validates, which is what ties the message to you.
The clever part is that the signature covers the content. If a single character of the signed headers or body changes in transit — an injected link, an altered reply-to, a rewritten subject — the hash no longer matches and verification fails. That's the tamper demo above made concrete: sign a message, verify it, then change one character and watch the same public key reject it. DKIM doesn't prove the message is good — it proves the message is unaltered and genuinely from a holder of the private key.
This is also why the selector matters. You can publish several public keys at once, each under its own selector label, which is how key rotation works without downtime: publish a new selector, switch your signer to it, confirm mail still verifies, then retire the old one. It's why generating a fresh pair — and knowing exactly which record and which private key go together — is a routine part of running email, not a one-time event.
/ Generating safely
Where should a production key really be generated?
Here's the honest answer, because a security tool that oversells itself isn't trustworthy. The gold standard for a production mail server is to generate the key on the server that will hold it — opendkim-genkey or openssl on the signing host — so the private key is born where it lives and never travels at all. That removes even the theoretical question of how it got there.
What this tool does differently from most online generators is that it never sees your key: server-side generators create the key on their machine and send it to your browser, which means their server touched your private key. Here, generation happens locally with the Web Crypto API — the same secure primitives your browser uses for HTTPS — and nothing is transmitted. You can prove it by disconnecting your network and generating anyway. That makes it a genuinely safe choice for testing, staging, learning, dual-signing experiments, and any setup where in-browser generation fits your threat model.
Wherever you generate, the discipline afterward is the same: move the private key over a trusted connection, store it with tight permissions, never paste it into a tool you don't trust, and rotate it on a schedule. A DKIM key is a long-lived credential that can sign as your domain, so it earns the same care as any other secret. Getting the key onto the right server, published, rotated, and retired cleanly across every service that signs for you is the ongoing operation behind a healthy setup — which is what we run.
/ Key generator FAQ
Is it safe to generate a private key in a browser?
Should I choose RSA or Ed25519?
What do I do with the two outputs?
Why does the tool sign and verify a sample message?
How long is a DKIM record, and why is it split?
Does anything leave my browser?
A key pair is a minute's work. Rotating it forever is the work.
Publishing a key is easy; keeping every sending service on strong, aligned, rotated keys — and retiring the old ones cleanly — is continuous. That's what we operate. Generate your pair, then bring us the rotation.
Book infrastructure reviewRelated capabilities