By Mian Ali Khalid · Published · How we build and test tools
How to use the dkim record checker
- Copy the DKIM TXT value from your DNS provider, or build one with the DKIM record generator.
- Paste it into the box. Quotes and the 255-character chunk splits of long records are joined for you.
- Read the status row first, then the key type, key size and any warnings.
- Fix the record in DNS and paste it again until the status is Valid.
How DKIM TXT records are structured
A DKIM TXT record consists of semicolon-separated tag-value pairs defined in RFC 6376. The only mandatory tags are v (version) and p (public key data). A minimal valid record looks like this:
v=DKIM1; k=rsa; p=MIGfMA0G...
The version tag must always be DKIM1. If it is missing, receiving servers assume DKIM1 by default, but including it explicitly avoids ambiguity. Tags can appear in any order, and whitespace around the equals sign and semicolons is ignored by most validators.
Parsing the public key and estimating RSA size
The p tag holds the public key in base64. For RSA, the decoded bytes are a DER SubjectPublicKeyInfo: an outer SEQUENCE that contains the algorithm identifier (the rsaEncryption OID and NULL) and a BIT STRING wrapping the RSAPublicKey, a SEQUENCE of two INTEGERs, the modulus and the public exponent.
The checker walks that structure, drops the leading zero byte that keeps the modulus positive and counts the bits of what is left. A 2048-bit key shows a 256-byte modulus (257 bytes with the zero), and its base64 is about 392 characters. A 1024-bit key is about 216 characters. The exponent is almost always 65537.
Ed25519 keys (RFC 8463, k=ed25519) are different: p is the raw 32-byte public key in base64, which is 44 characters, with no DER wrapper.
Practical uses for a dkim checker
Email administrators use a dkim checker when troubleshooting delivery failures or DMARC alignment issues. If a receiving server rejects a message because the signature does not verify, the first step is to confirm that the published TXT record matches the private key used to sign the message.
When rotating keys, you publish a new selector and eventually revoke the old one by setting p= (an empty public key). Parsing the record lets you confirm the revocation took effect before removing the old private key from your signing infrastructure. You can also pair this tool with the DMARC record checker and SPF record checker to audit your entire email authentication stack.
Common mistakes and edge cases
DNS providers split long TXT records into several quoted strings of up to 255 characters. Paste them as they appear: the checker joins the quoted pieces before it reads the tags, and it ignores line breaks and spaces inside p.
A truncated key is the most common failure. If the base64 length is not a multiple of 4, or the decoded bytes are not valid DER, part of the key was lost in the dashboard or the copy. Re-publish the whole value.
Other frequent problems are a duplicated tag, a v value other than DKIM1, a 1024-bit key left in place after a rotation, and an Ed25519 key published without k=ed25519. A missing k tag means rsa, which is valid.
Worked examples
| Example | Input | Result |
|---|---|---|
| 2048-bit RSA key | DKIM TXT Record: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2fUmML3M6XOtwYnvcFy3aNfj5SWS2Mf0/lP9T0yR4wOkg7HMWt1wRVekKFOk9Avqyg6eSQT5msZlVRVIKUQo7F5v4zlW7VM+3hX8IHJePH9CaVapBidREXqULbi3HSlxPFgzKgMC0zygqAkUalB03Z5g00flmDsjySs3CVrvjRK0IXMJmzwvkdMlbEpx2wJULbx1rOml/60WbWQFLdrsAQmeH04EQeZIQlCCHaXg7aN/QEoop7mxwJSOHnkwHanH0F19zfoaqI4YDk3ABc+nj5EK/ymiH7m0xQBbnDT5afBD82FnmZJk8/qH5U1yrtUrJKduNs6mPQZFg+FaQ9Qd1wIDAQAB | Status: Valid; Version (v): DKIM1; Key type (k): rsa; Public key (p): Present (2048-bit RSA); RSA exponent: 65537 |
| Split TXT strings with test mode | DKIM TXT Record: "v=DKIM1; k=rsa; t=y; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDhhHXfUYDmj8G7S1y8RzChcplHrT6dFF4U7w7FivjG2O3qf2Mb2YI94fkCPrWe" "J++AK0qKKCeWrHob/TeoRIsPqZE8c9xOlz9S4MhCq2fSXG5H1lCzcu6H5pmATgkVb/XAhIlgPKjJx3GXuKt4GBGzU+jZvMl6IZre" "B4CEwUwjFwIDAQAB" | Status: Valid with warnings; Version (v): DKIM1; Key type (k): rsa; Public key (p): Present (1024-bit RSA); RSA exponent: 65537; Flags (t): y; Warning 1: A 1024-bit key is weak by current guidance. Move to 2048 bits.; Note 1: t=y marks the domain as testing DKIM: receivers should not treat failures as definitive. Remove it once signing works. |
| Ed25519 key | DKIM TXT Record: v=DKIM1; k=ed25519; p=0vbv2gaRJtj6RIpjQNNFzVjVigL0eTSfHsd7r9TeazE= | Status: Valid; Version (v): DKIM1; Key type (k): ed25519; Public key (p): Present (Ed25519, 32 bytes) |
| Revoked selector | DKIM TXT Record: v=DKIM1; p= | Status: Revoked key; Version (v): DKIM1; Key type (k): rsa (default); Public key (p): Revoked (empty); Note 1: An empty p= means this selector has been revoked: signatures using it fail verification. |
FAQ
What does this dkim checker do?
It parses a DKIM TXT record, reads each tag, checks the base64 of the public key and works out the RSA key size from the DER structure. It also flags test mode, revoked keys, weak keys and sha1 hashes.
Is my DKIM record sent to a server?
No. The parsing and key analysis run in your browser, and nothing is uploaded.
What does an empty p tag mean?
An empty p= means the key was revoked. Receivers treat signatures that use that selector as failed.
Why does the base64 check fail?
The key was most likely cut off or altered: a length that is not a multiple of 4, a stray character or misplaced = padding all fail. Copy the full value from your DNS zone again.
Can I check Ed25519 DKIM keys?
Yes. With k=ed25519 the p value must be the base64 of the raw 32-byte public key (RFC 8463). A key wrapped in a SubjectPublicKeyInfo gets a warning.
What RSA key size should I use for DKIM?
Use 2048 bits. RFC 8301 says verifiers must not accept signatures from keys under 1024 bits, and 1024-bit keys are considered weak.
What does t=y mean?
It marks the domain as testing DKIM, so receivers should not treat a failed signature as definitive. Remove the flag when signing is working.