Free tool

Add a DKIM key generator to your site.

Give your readers the generator on your own page. Pick a theme, copy one snippet, and you're done. Free, with no account or key.

No account or key needed.

Get the snippet

Free for hosting docs, help centres and email guides. Paste the snippet where you want the generator. Your visitors make keys in their own browser.

<iframe src="https://lemon.domains/embed/dkim-generator" title="DKIM key generator" width="100%" height="720" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p style="font-size:13px"><a href="https://lemon.domains/tools/dkim-generator">DKIM key generator</a> by Lemon Domains</p>

Or link to it

For a resource list, a tools page or a forum post.

<a href="https://lemon.domains/tools/dkim-generator">DKIM key generator</a> by Lemon Domains

Frequently asked questions

Can I put this generator on my website?

Yes. Pick a theme above and copy the snippet: an iframe with the generator and a link to the full tool. It's free and needs no account or key. Keys are made in your visitor's browser, and the snippet sets no cookies on your page.

Is it safe to make a DKIM key in the browser?

Yes. The key pair is made with your browser's built-in Web Crypto, the same code browsers use for HTTPS, and the private key never leaves your device: nothing is sent to Lemon Domains or saved. Once you close the page the key is gone, so save it first.

Should I use my mail provider's DKIM instead?

If you send through Google Workspace, Microsoft 365 or a service like SendGrid or Mailchimp, yes: turn on DKIM in its settings, because it keeps the private key and signs for you. Generate your own key when you run the mail server yourself, for example Postfix with OpenDKIM, or when a service asks you to upload one.

What is a selector?

The name the key is published under, at selector._domainkey.yourdomain. It lets one domain have several keys at once, one per service or per year. The generator suggests one named for the month, such as s202610, so the next key gets a new name.

RSA 2048, RSA 1024 or Ed25519?

Use RSA 2048. RSA 1024 still works but is considered weak, so use it only when a DNS host can't take a longer record. Ed25519 keys are short and modern, but not every receiver checks them yet, so sign with an RSA key as well if you use one.

My DNS host says the record is too long

TXT records hold strings of up to 255 characters, and a 2048-bit key is longer. Most DNS hosts split it for you. If yours doesn't, tick the split option and paste the value with its quoted parts; receivers join them back up.

How often should I change my DKIM key?

Every six to twelve months is common. Publish the new key under a new selector, switch the mail server to sign with it, wait a few days for mail in flight to arrive, then remove the old record.

How do I check the key works?

Look the record up with the DKIM checker, using your domain and selector. Then send a message to an address you can read and look for dkim=pass in its headers, or watch your DMARC reports, which show the signature passing within a day or two.