DKIM Record Generator
Easily generate DKIM records by enter a selector and your domain name. Your public/private key pair is generated locally in your browser (or on our server if JavaScript is disabled) and we show you the corresponding DNS record.
What is DKIM
DKIM (DomainKeys Identified Mail) is an email authentication method that lets you cryptographically sign your outgoing messages. When a receiving mail server gets a signed message, it can verify that the email really came from your domain and was not modified in transit — protecting your recipients against spoofing and phishing that abuses your domain name.
It works with a key pair: your mail server keeps the private key secret and uses it to sign every outgoing message. The matching public key is published in your DNS as a TXT record, so anyone can look it up and verify the signature. That record lives at selector._domainkey.yourdomain.tld and carries the public key in its p= tag.
The selector is a short name you choose yourself, like default, mail, or service-x. It is stamped into the signature of every message and tells receiving servers which DNS record to look up — handy when you use several mail services, each with its own key. Just make sure the selector configured in your mail server matches the selector in the DNS record you create here.
This tool generates the key pair (RSA or Ed25519) for you and shows the exact DNS record to add. You can create as many selectors as you need. Note that DKIM is one piece of the puzzle: combine it with SPF (which lists the servers allowed to send for your domain) and DMARC (which tells receivers what to do with mail that fails the checks) for full protection.
Tip: Ed25519 keys are smaller and faster, but not all receiving mail servers support their verification yet. For maximum compatibility, publish an additional RSA 2048 key using a second selector (e.g., selector1 for Ed25519 and selector2 for RSA).
RSA 3072 and 4096 keys are less commonly used. RSA 2048 remains the recommended default, offering broad compatibility while keeping DNS records relatively short.
Invalid DKIM selector and/or domain name
Generated locally in your browser — the private key never left this device.
Generated on the server (JavaScript disabled) — the key was never stored or logged.
- Public DNS record:
-
- Private key (RSA 2048-bit):
- Public key: