Skip to content
Groundmail

Free tool · Generate

DKIM record generator

Generate a DKIM key pair in your browser, or paste a public key a service gave you, and get the TXT record to publish. Nothing is sent to us.

What the DKIM generator makes

It creates a 2048-bit RSA key pair in your browser, or formats a public key you already have, and gives you the DKIM TXT record and the host name to publish it at. You need this only if you sign mail on your own server; the record lets receivers verify your signatures, which is half of what DMARC checks.

How to read the record

Host
selector._domainkey.yourdomain.com. The selector is any name you pick, and it must match the s= your server signs with.
v=DKIM1
The version tag. Optional, but if present it must come first.
k=rsa
The key type. RSA is what every receiver supports.
p=
The public key, base64-encoded. An empty p= means the key is revoked.
Private key
Goes on the server that signs your mail, never in DNS. We never see it, so save it before you leave the page.

When you need this

If you run your own mail server (Postfix, Exim, a Node or Go SMTP library), you need a key pair: the private key signs, the public key goes in DNS. Hosted providers make the key for you and only give you the record.

The key pair is generated with your browser's Web Crypto API, so the private key never leaves your device. After publishing, check it with the DKIM checker.

Skip the key management.

Groundmail creates a DKIM key for your domain, shows you the one record to publish, and signs every message with it. No private keys on your servers.

Questions

What does a DKIM record look like?

A TXT record at selector._domainkey.yourdomain.com with the value v=DKIM1; k=rsa; p= followed by the base64 public key. A 2048-bit key makes the value about 400 characters long.

How do I generate a DKIM key?

Pick a selector, generate a 2048-bit RSA key pair, install the private key on the server that signs your mail, and publish v=DKIM1; k=rsa; p=<public key> as a TXT record at selector._domainkey.yourdomain.com.

Why is my DKIM record too long for my DNS provider?

A 2048-bit key is longer than the 255 characters one TXT string can hold. Most providers split it for you; for those that don't, tick the split option to get it as several quoted strings.

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

Yes. The key is made with your browser's built-in cryptography and nothing is uploaded. Save the private key somewhere safe: we never see it, so we can't recover it.