DKIM Signature Verifier
Verify a pasted DKIM-Signature offline: canonicalization, body hash and RSA/Ed25519 signature checks, step by step.
Signature, message and key
Paste the full raw message, not just the body. Importing a .eml preserves its exact line endings. Nothing is uploaded or stored — all math runs in this tab.
Verification
awaiting inputsPaste a signature, message and key
Try a pinned sample above to see a full step-by-step verification.
Examples
Body tampered after signing
bh=OWQGfp… (signature)
body: Hello there → Hello evilBody hash — FAIL · Header signature — SKIPPEDThe verifier stops at the first broken step and does not blame the key for a body change.
Defensive h= list
h=from:reply-to:subject:date (no Reply-To header present)PASS — Reply-To contributes zero bytes per RFC 6376 §5.4.2Over-signed lists are normal; treating a missing header as an empty value would false-FAIL this message.
Canonicalization matrix
Declared c=relaxed/relaxed, signer used relaxed headers and simple bodyOnly c=relaxed/simple passes in diagnose modeThe matrix isolates header and body canonicalization differences without guessing.
About this tool
A DKIM signature is a cryptographic claim over selected headers and a hash of the message body. When a receiver says dkim=fail, the log rarely says whether the tag list was malformed, the body hash changed in transit, the right key was fetched, or the header bytes were canonicalized differently. This verifier runs each of those steps separately in your browser and shows which one broke first.
Paste the DKIM-Signature header, the full raw message (headers, blank line and body) and the DNS TXT public key. The tool parses the tag list per RFC 6376, canonicalizes the body with simple or relaxed rules, applies the l= byte limit, compares the computed bh=, then verifies the RSA-PKCS1-v1_5 or Ed25519 signature over the canonical signed headers with WebCrypto. RSA keys published in DNS are PKCS#1 DER; the tool wraps them into SPKI before importing, so real-world TXT records work without conversion.
Diagnose mode retries all four header/body canonicalization combinations and reports which one passes — the fastest way to spot a signer that relaxed whitespace the verifier treated as significant. Clicking a step reveals the exact canonical bytes that fed it. Advisories cover short l= values, expired x=, unsigned headers, testing-mode keys, weak RSA keys and deprecated SHA-1. There is no DNS fetch, no upload and no storage: the email stays in this tab.
What this tool does not do
- Verification uses pasted inputs only: no DNS lookup, no DMARC/SPF evaluation and no reputation scoring.
- The message is expected to be a single DKIM-Signature; additional signatures are noted but not verified.
- Ed25519 verification requires a browser with WebCrypto Ed25519 support; the capability chip reports it.
- Messages are capped by browser memory rather than a hard limit; very large attachments in a pasted .eml can slow the tab.
- Timestamp advisories compare against this device's clock, which may itself be wrong.
How to use this tool
Paste the three inputs
Enter the full DKIM-Signature header, the complete raw message including the blank line before the body, and the TXT record containing p=. Use Import .eml to preserve exact bytes from a saved message.
Check line endings
LF→CRLF normalization is on by default because pasted mail often loses carriage returns. Turn it off only when verifying the exact bytes you captured.
Read the step checklist
Signature tags, required tags and From, key record, body hash, header signature, time window and identity alignment each get a verdict. The first failing step is highlighted.
Inspect canonical bytes
Click any step to see the bytes it hashed or verified; this is where folded headers, trailing spaces and the removed b= value become visible.
Turn on diagnose mode
If a message should pass but does not, enable all four c= modes. A single passing cell tells you the signer's actual canonicalization choice.
Copy the report
Use Copy report or the TXT download to attach the verdicts, hashes and advisories to a deliverability ticket.
Use cases
Deliverability incident triage
A receiver logs dkim=fail with no detail. Paste the message and key to learn whether bh=, canonicalization or the key import broke.
Signer rollout QA
Check a new signing configuration end-to-end before shipping: relaxed vs simple, header coverage and l= behavior are all visible.
Anti-spam research
Inspect a captured sample's signed header set to see which headers an attacker can change without invalidating the signature.
Inputs and algorithms understood by the verifier
| Field | Accepted form / behavior |
|---|---|
| DKIM-Signature | Tag list with or without the field name; folded values are unfolded for parsing, while canonicalization keeps the original folding. |
| c= | simple, relaxed, or header/body (default simple/simple). Diagnose mode overrides it for detection only. |
| a= | rsa-sha256, rsa-sha1 (deprecated advisory) or ed25519-sha256 (RFC 8463). |
| p= | Base64 PKCS#1 DER RSAPublicKey for RSA, or 32 raw bytes for Ed25519; embedded FWS and quoted TXT chunks are tolerated. |
| l= | Byte count of the signed body prefix. A value longer than the canonical body is a failure, not a silent truncation. |
| h= | Colon-separated signed header names. An absent name contributes zero bytes; each repeat consumes one instance from the bottom of the block. |
| Input file | .eml / message/rfc822 text. The first DKIM-Signature header is copied into the signature field automatically. |
Only pasted inputs are verified. The tool never resolves selector._domainkey.domain and never evaluates DMARC or spam reputation.
Common mistakes
Mistake:Pasting only the message body.
Fix:DKIM signs headers too. Paste the whole .eml or raw source, including the blank separator line.
Mistake:Fetching a key with the wrong selector or using the domain's main TXT record.
Fix:Use selector._domainkey.domain from the s= and d= tags; this tool verifies the pasted record and cannot look it up.
Mistake:Assuming an h= name that is not present should hash as an empty header.
Fix:RFC 6376 §5.4.2 contributes zero bytes for missing signed headers; the tool follows that rule and reports the absence as an advisory.
Mistake:Letting a text editor reflow folded headers before pasting.
Fix:Import the .eml file directly, or keep the leading whitespace on continuation lines and use LF→CRLF normalization.
Mistake:Treating a short l= as proof the whole message is authentic.
Fix:The advisory flags l= shorter than the body: appended bytes after the signed prefix are not covered.
Frequently asked questions
Why does my DKIM signature fail?
The checklist tells you which step broke. A body-hash failure means the message bytes changed after signing (or line endings were altered by a paste). A header-signature failure with a matching body hash usually means a header was modified or the signer canonicalized whitespace differently. A key-record error means the pasted TXT record is revoked, malformed, or does not match the signature's algorithm.
What is the difference between relaxed and simple canonicalization?
Simple canonicalization hashes headers and the body almost exactly as transmitted, including folding and trailing spaces. Relaxed lowercases header names, unfolds continuation lines, collapses whitespace runs, removes whitespace around the colon and strips trailing body whitespace. Diagnosis mode tries all four header/body combinations and shows which one verifies.
What does the l= tag do?
l= limits the body hash to the first N octets of the canonicalized body. It is valid, but a short l= leaves appended content unsigned, which RFC 6376 §3.4.5 calls out as a truncation risk. The tool hashes the declared prefix and shows an advisory; if l= is longer than the body, verification fails rather than silently hashing the whole message.
Why must From be in the h= list?
RFC 6376 requires every DKIM signature to sign the From header; otherwise an intermediary could swap the visible sender without breaking the signature. A signature without From is a hard failure here. If h= names a header that is not in the message, that name simply contributes zero bytes.
Can my email leave my browser when I use this tool?
No. Parsing, canonicalization, hashing and signature verification all run locally with WebCrypto. The tool does not fetch DNS, call an API, store the message or send analytics about its content. Importing a .eml file reads it directly into the browser tab.
Why does an Ed25519 signature not verify?
Ed25519 verification needs browser WebCrypto support (current Chromium and Safari provide it; the capability chip reports availability). The key record must declare k=ed25519 and p= must decode to exactly 32 bytes. Note that a=ed25519-sha256 still uses SHA-256 for bh=, but the signature itself covers the raw canonical header bytes.
References & standards
Related tools
AES Encryption
Encrypt and decrypt text with AES-GCM and a passphrase, fully in your browser. Uses PBKDF2 key derivation and the Web Crypto API — your data and keys never leave your device.
Android Network Security Config Builder
Generate network_security_config.xml with cleartext rules, trust anchors, certificate pinning and debug-only CAs — plus the manifest snippet and file placement checklist.
Ansible Vault Encrypt/Decrypt
Encrypt secrets into $ANSIBLE_VAULT;1.1;AES256 format or decrypt vault content with its password — locally in your browser, drop-in compatible with ansible-vault.
Argon2 Hash Generator & Verifier
Generate Argon2id/2i/2d hashes with proper m/t/p parameters and verify PHC strings — reference algorithm in your browser, nothing uploaded.
AWS Signature V4 Builder
Build AWS Signature V4 headers and presigned URLs from a canonical request — signed curl, key chain and debug diff, computed locally in your browser.
Basic Auth Generator
Generate an HTTP Basic Authentication header from a username and password. Produces the Authorization header and ready-to-use curl and fetch snippets. Runs fully client-side.