Free tool
DKIM record generator
Generate an RSA key pair in your browser and copy the TXT record, the host to publish it on, and the private key for your signing server. The private key never leaves this page.
Made in your browser. The private key never leaves this page.
With SendHeron you never make a DKIM key yourself: adding a sending domain gives you the records to publish, and every email is signed for you. SendHeron is lifecycle email automation for SaaS. Start a free trial if you want your sending handled that way.
Do you need your own DKIM key?
Usually not. Most email providers generate the key pair themselves, keep the private half, and give you records to publish. Amazon SES Easy DKIM, for example, asks for three CNAME records that point at keys Amazon SES hosts, and signs with a 2048-bit key by default. If your provider gives you records, publish those and you are done: nothing on this page improves on them.
You need your own key when you sign mail yourself, on your own mail server or with a signing library, or when a provider asks you to bring one. Amazon SES offers that too, as Bring Your Own DKIM: you publish a single TXT record and give SES the private key, which it accepts at 1024 to 2048 bits.
1024, 2048 or 4096 bits
RFC 8301 sets the rules. Signers must use RSA keys of at least 1024 bits and should use 2048, and every verifier must accept keys from 1024 to 4096 bits. It also retires rsa-sha1: signatures use rsa-sha256, which is what these keys are for.
So 2048 is the default here and the right choice for nearly everyone. 1024 is the floor, worth choosing only for a DNS host or signer that cannot take a longer value; Amazon SES keeps a 1024-bit option for exactly that case, a DNS provider that only supports 1024-bit DKIM. 4096 verifies everywhere but doubles the record length, and some signers stop at 2048, Amazon SES's Bring Your Own DKIM among them.
Selectors and rotation
The selector is the name the key is published under, and every signature carries it in its s= tag so receivers know which record to fetch. Any short DNS label works. A name that says when the key was made, such as 2026-10, makes the next rotation obvious, and each service that signs for your domain should have a selector of its own.
To rotate, publish the new key under a new selector, then switch your signer to it. Leave the old record in place for at least a week: RFC 5321 expects mail servers to keep retrying undelivered mail for at least four to five days, and a message signed with the old key can arrive that late. Then revoke the old key by publishing its record with an empty p= value, which RFC 6376 defines as a revoked key. Rotate on a schedule you will keep, and at once if a private key may have leaked.
Long values and split strings
A 2048-bit key makes a record of about 410 characters, and one string in a TXT record holds at most 255. How you enter a long value depends on your DNS host. Amazon Route 53, for one, expects it as several quoted strings on one line, which is the second form this tool gives you; a host that takes the value in one piece gets the first.
Receivers join the strings with nothing in between, as RFC 6376 requires, so both forms publish exactly the same record, and the cut can fall anywhere, even in the middle of the key. A 1024-bit record fits in one string; a 4096-bit record needs three.
The private key stays in this page
The key pair is generated by your browser's Web Crypto API, on your own device. The private key is never sent anywhere: no request, log or analytics event carries it, and closing the tab discards it. Once the page has loaded, the generator works without a connection at all.
That is also why it cannot be recovered. Copy it or download it, and put it in your signing server or provider before you leave. It never goes in DNS: only the public half does, inside the record above.
Worth reading next: the DKIM checker, SPF, DKIM and DMARC explained from scratch, the Amazon SES production checklist
Questions
DKIM record generator, in detail
Free trial
Email automation by people who obsess over this layer
SendHeron is lifecycle email for SaaS: sequences, tags, and an API, running on authentication done properly. Start a trial and put it under your own sending.
7-day free trial. Pick a plan, add a card, cancel before the trial ends and you won't be charged. 1,000 contacts and 5,000 sends during the trial.
The rest of the toolkit
- DMARC checkerRead any domain's DMARC record: policy, reports, and what to fix.
- SPF checkerResolve the whole SPF tree and count lookups against the limit of 10.
- SPF record generatorBuild one SPF record from your senders, with every lookup counted.
- DKIM checkerTest a DKIM key by selector, or probe 15 common selectors at once.
- DMARC record generatorBuild the exact DMARC TXT value and know exactly where to publish it.
- Email deliverability testMX, SPF, DKIM and DMARC in one pass, with a prioritized fix list.
- Email header analyzerTrace an email's route and delays, and read its SPF, DKIM and DMARC.