Free tool · 04 / SEND
DKIM record generator.A new DKIM key and its DNS record, in seconds, no signup.
Makes a DKIM key pair in your browser and writes the TXT record to publish.
Runs in your browser. Nothing you type is sent to us.
Sending from Google Workspace or Microsoft 365? You don't need this: Google makes the key in the Admin console, and Microsoft makes two and asks you for CNAME records.
Example for yourcompany.example. Generate to get your own key.
- Type
- TXT
- Host or name
s1._domainkeyFull name:s1._domainkey.yourcompany.example- Value
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA85rE+sHrkzi+cCbUe/MhqF7dFy2SnMbz+zfQfDX/YcqJrGntNsN6bpyb08tmI8c016WncyFrCbpw6s+yrJZI0uJrLrQXw7VlBL/uPxRC1wMVACT2WaxywunkDpJ2yoZFvLtfsOv7rytkIyViRW5zeK7pbive+dUVfB9giDn9O5Z2iM2GGNwLxrQEhUvkzeSCVWXanjK2csJm9T5yNX4dNUGNfacrpaZ9IN9pOOYe74xX0yb7eOHoWsD5WsGM9EugBbQxUQcyD+aF+0EFTg84NeovlWU4JFSC+lk1Eet4k00cIVRkX7HajQUgKMV9v51Q+ciY2mXwlGeTM+p3o4AJWwIDAQAB410 characters, 2048-bit key- Split for 255-character strings
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA85rE+sHrkzi+cCbUe/MhqF7dFy2SnMbz+zfQfDX/YcqJrGntNsN6bpyb08tmI8c016WncyFrCbpw6s+yrJZI0uJrLrQXw7VlBL/uPxRC1wMVACT2WaxywunkDpJ2yoZFvLtfsOv7rytkIyViRW5zeK7pbive+dUVfB9giDn9O5Z2iM2GGNwLxrQEhUvkzeSCV" "WXanjK2csJm9T5yNX4dNUGNfacrpaZ9IN9pOOYe74xX0yb7eOHoWsD5WsGM9EugBbQxUQcyD+aF+0EFTg84NeovlWU4JFSC+lk1Eet4k00cIVRkX7HajQUgKMV9v51Q+ciY2mXwlGeTM+p3o4AJWwIDAQAB"
Made in this browser. We never see it, and it's gone when you close the tab, so save it now. It goes in your mail server's DKIM settings, never in DNS.
Published it? Check it with the SPF, DKIM and DMARC checker →
Valley sends from your own Gmail or Microsoft inbox, so your domain's own DKIM signing carries over. See how Valley does it ↗
NEXT STEP
Fed up with signed, sealed and unanswered.The other half is who, and what you say.
Book a demo ↗$500 a month for your first seat, $200 for each seat after that.
The record
What goes in a DKIM record?Every tag RFC 6376 defines, and which you need.
A DKIM record is a TXT record at selector._domainkey.yourdomain that publishes the public key receivers use to check your signatures. Only p=, the key itself, is required; v=DKIM1 and k=rsa are the usual companions, and an empty p= means the key has been revoked.
| Tag | What it holds | Required? | Default |
|---|---|---|---|
| v= | Version. If present it must be DKIM1, and first. | No, recommended | DKIM1 |
| k= | Key type | No | rsa |
| p= | The public key, base64. Empty means revoked. | Yes | None |
| h= | Hash algorithms the key may be used with | No | All |
| s= | Service types the key applies to | No | * (all) |
| t= | Flags: y means testing, s means i= must match d= exactly | No | None |
This generator writes v=DKIM1; k=rsa; p= and nothing else, which is what most mail servers expect.
From RFC 6376: DomainKeys Identified Mail (DKIM) Signatures ↗, read 9 Nov 2026
How it works
How this tool works.And what it can't see.
Type your domain, pick a selector and a key size, and generate. Your browser makes an RSA key pair with the Web Crypto API; nothing is sent to us, and the private key exists only in this tab until you save it.
You get the record's host name, selector._domainkey, the TXT value, the same value split into quoted strings of at most 255 characters for DNS hosts and zone files that need it, and the private key as a PEM file for your mail server.
2048 bits is the default because RFC 8301 says signers should use at least 2048-bit keys. Choose 1024 only if your DNS host can't store the longer record; RFC 8301 sets 1024 as the minimum.
What it can't do is publish the record or install the key: those happen at your DNS host and your mail server. Once the record is live, the SPF, DKIM and DMARC checker reads it back.
Built by Valley.
Sources
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures ↗read 9 Nov 2026
- RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM ↗read 9 Nov 2026
- RFC 1035: Domain names, implementation and specification ↗read 9 Nov 2026
- Google Workspace Help: Set up DKIM ↗read 9 Nov 2026
- Microsoft Learn: How to use DKIM for email in your custom domain ↗read 9 Nov 2026
DKIM keys
Set up a DKIM key without breaking mail.Four things the RFCs and providers say.
DKIM is simple once you know where each half of the key goes.
- 01
Check whether you need a key at all
Google Workspace generates DKIM keys in the Admin console, with google as the default selector and 2048 bits recommended. Microsoft 365 generates two key pairs itself and asks you to publish CNAME records at selector1._domainkey and selector2._domainkey. A generated key is for your own mail server, or a service that asks you to bring one.
From Google Workspace Help: Set up DKIM ↗ · Microsoft Learn: How to use DKIM for email in your custom domain ↗, read 9 Nov 2026
- 02
Use 2048 bits
RFC 8301 says signers must use RSA keys of at least 1024 bits and should use at least 2048, and receivers must be able to verify keys from 1024 to 4096 bits. It also retired rsa-sha1, so signatures need sha256.
From RFC 8301: Cryptographic Algorithm and Key Usage Update to DKIM ↗, read 9 Nov 2026
- 03
Long records and the 255-character limit
A single string in a DNS TXT record holds at most 255 characters, and a 2048-bit DKIM record is longer. The fix is several quoted strings in one record: RFC 6376 says receivers join them with no whitespace in between. Some DNS hosts split it for you; for the rest, paste the split value.
From RFC 1035: Domain names, implementation and specification ↗ · RFC 6376: DomainKeys Identified Mail (DKIM) Signatures ↗, read 9 Nov 2026
- 04
Rotate with a new selector
Selectors exist so a domain can have several keys at once. RFC 6376 advises giving new keys new selectors rather than reusing old ones: publish the new key under a new selector, switch the mail server to it, then revoke the old one with an empty p=.
A signed message proves it's from you. Whether anyone replies depends on who it's to. See how Valley does it ↗
From RFC 6376: DomainKeys Identified Mail (DKIM) Signatures ↗, read 9 Nov 2026
Questions
Questions people ask.
- What is a DKIM record?
- A DNS TXT record at selector._domainkey.yourdomain that publishes the public key receivers use to verify your messages' DKIM signatures.
- How do I generate a DKIM key?
- Type your domain and a selector here and click generate. Your browser makes the key pair; publish the TXT record and put the private key in your mail server.
- What DKIM key size should I use?
- 2048 bits. RFC 8301 says signers should use at least 2048-bit RSA keys, and must use at least 1024.
- What is a DKIM selector?
- The name that picks one key out of several for the same domain, like s1 or google. It's in each signature's s= tag and in the record's host name.
- Where do I put the DKIM record?
- At your DNS host, as a TXT record named selector._domainkey on your domain, for example s1._domainkey.acme.com.
- Do I need a DKIM generator for Google Workspace or Microsoft 365?
- No. Google generates the key in the Admin console, and Microsoft 365 generates its own keys and gives you two CNAME records to publish.
- How do I split a long DKIM record?
- Break the value into quoted strings of at most 255 characters each, in one TXT record. Receivers join them with no spaces. This page gives you the split value.
- How do I revoke a DKIM key?
- Publish the record with an empty p= value. RFC 6376 says an empty p= means the key has been revoked.
- Is my private key safe here?
- It's made by your browser's Web Crypto API and never sent anywhere. We don't see it, and it's gone when you close the tab.
- Is this DKIM generator free?
- Yes. It's free, needs no signup and runs in your browser.
Keep going
Try one of these next.
- SPF record generatorEmail outreachBuilds an SPF record and counts every DNS lookup, nested includes too, against 10.Open the tool
- DMARC record generatorEmail outreachWrites a DMARC record to RFC 9989, with report addresses, alignment and test mode.Open the tool
- SPF, DKIM and DMARC checkerEmail outreachChecks a domain's SPF, DKIM and DMARC records against Gmail and Yahoo's sender rules.Open the tool
- Email setup mapEmail outreachDraws a domain's email setup as one diagram: MX, the SPF include tree, DKIM and DMARC.Open the tool
- Cold email domain finderEmail outreachSending domain ideas close to your brand, each checked against its registry.Open the tool