Skip to content
NewA free test that shows whether your emails will reach the inbox.
Get started

DKIM generator

Free. A 2048-bit RSA key pair made in your browser and the DNS record to publish. The key is never sent anywhere.

Your domain
KeyRSA 2048 · SHA-256

Your browser's own WebCrypto makes the key pair. The page makes no request with it, so we never see your private key, and it is gone when you close the tab.

  1. 1 Publish the TXT record at the host.
  2. 2 Give the private key to the server or library that sends your mail.
  3. 3 Sign with d=your domain and s=mail.
  4. 4 Check it with the DKIM checker.
Made in this tab. The key is never sent anywhere.
DNS recordTXT
Host
mail._domainkey

Most DNS hosts want only mail._domainkey and add the domain themselves; the copy button copies that part.

Generate a key pair and the record value appears here.

Private key · PKCS#8 PEM

OpenDKIM, Postfix, Exim and most DKIM libraries read this format. Keep it secret: anyone with it can sign mail as your domain. Save it before you close the tab, since it exists nowhere else.

Runearc sets this up for you: add your domain free, get the exact SPF, DKIM and DMARC records, and we check them for you.

What the generator does.

Make a 2048-bit RSA key pair for DKIM in your browser and get the DNS record to publish. The private key never leaves this page.

  • Made in your browser

    WebCrypto

    The key pair is generated by your browser's own cryptography. The page makes no request with it, so we never see your private key.

  • 2048-bit RSA

    Recommended

    The size RFC 8301 recommends and every receiver verifies. 1024-bit keys still work but are being phased out.

  • The DNS record

    TXT

    v=DKIM1; k=rsa; p=… at <selector>._domainkey.<domain>, ready to paste.

  • Split for DNS

    255 chars

    A 2048-bit key is longer than one 255 character DNS string. Most hosts split it for you; if yours does not, copy the quoted version.

  • The private key

    PEM

    PKCS#8 PEM to copy or download, for OpenDKIM, Postfix, Exim or the DKIM library in your app.

  • Check it after

    Verify

    One click to the DKIM checker, which reads the published key and its length back from DNS.

How to publish the DKIM record.

Publish the TXT record at <selector>._domainkey on your domain, give the private key to the server or library that sends your mail, and set it to sign with d= your domain and s= the selector. Then check the key with the DKIM checker and send a message to the email deliverability test to see the signature verified.

Use a generated key only for mail you sign yourself. Mailbox providers and email services (Google Workspace, Microsoft 365, your email API) make their own key and give you the record to publish. When you rotate, publish the new key at a new selector, switch signing, and keep the old record for a few days. DKIM works with SPF and DMARC; the domain check shows all three.

Questions.

Is it safe to generate a DKIM key online?
It is when the key is made in your browser and never sent anywhere, as here: the page uses WebCrypto and makes no request with the key. Avoid generators that make the key on their server, since they could keep a copy of your private key.
What key length should I use for DKIM?
2048-bit RSA. It is what RFC 8301 recommends and what major mailbox providers issue. Keys under 1024 bits are ignored, and 4096-bit keys are too long for some DNS hosts.
What should I use as the DKIM selector?
Any name not already used on your domain. A short word like mail or a date like 2026q4 makes rotation easy: the next key gets the next name. The selector goes in the record name and in the s= tag of each signature.
My DNS host rejects the long DKIM record. What now?
A TXT record is made of strings of at most 255 characters. Most DNS hosts split a long value for you; some need it pasted as several quoted strings. Use the quoted version under the record.
Do I need this if I use Google Workspace or an email API?
No. Those services make the key pair themselves and show you the DNS record to publish. This generator is for servers and apps that sign mail themselves.
Does Runearc see my private key?
No. The key is generated and shown only in your browser, and nothing is sent to us. Close the tab and it is gone, so save it before you leave.

More free tools

All free tools