DKIM Key Generator
Generate a DKIM RSA key pair in your browser: the selector._domainkey DNS TXT record (split for DNS) and the private key file. Keys never leave your device.
DKIM signs every outgoing message with a private key; receivers check the signature with the public key you publish in DNS. This generator creates a fresh RSA key pair inside your browser with WebCrypto and gives you the DNS record name, the TXT value (also split into 255-character strings for DNS hosts that need it) and the private key as a PEM file for your mail server. A test signature confirms the pair works. Nothing is uploaded.
How to use this tool
- Enter your sending domain and a selector name (for example a date such as 2026a).
- Keep 2048-bit unless your DNS host cannot store long records.
- Publish the TXT value at selector._domainkey.yourdomain.
- Install the private key in your mail server's DKIM signer and send a test message to check the signature passes.
Formula
DNS name: <selector>._domainkey.<domain> · TXT: v=DKIM1; k=rsa; p=<base64 SubjectPublicKeyInfo>
The key is RSASSA-PKCS1-v1_5 with public exponent 65537, used with SHA-256 (rsa-sha256, RFC 6376; RFC 8301 forbids rsa-sha1 for signing). A single DNS string holds at most 255 characters, so 2048-bit keys are published as two quoted strings in one TXT record.
Example
For example.com with selector s1, publish a TXT record at s1._domainkey.example.com whose value starts with v=DKIM1; k=rsa; p=MIIB… For a 2048-bit key the value is about 410 characters, published as two quoted strings. The private key file s1.example.com.private.pem goes to your mail server; the "Key pair check" shows OK when the keys sign and verify correctly.
Frequently asked questions
Should I use this for Google Workspace or Microsoft 365?
No. Both generate the key in their admin console and keep the private key themselves; you only publish the record they show. Use this generator for a server you run yourself.
1024 or 2048 bits?
2048. RFC 8301 requires at least 1024 and recommends 2048; 1024-bit keys are considered weak. Use 1024 only if your DNS provider cannot store a split record.
Is it safe to make a private key in a browser?
The key comes from the browser's own cryptographic random number generator and stays on your device. Save it securely and do not share the file.
Sources
Last updated:
Page address with these inputs: https://kakao.mobile/tools/dkim-generator/
Cite or embed this tool
kakaoCalc. (2026, November 8). DKIM Key Generator. https://kakao.mobile/tools/dkim-generator/
“DKIM Key Generator.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/dkim-generator/.