HMAC and keyed BLAKE2
Compute an HMAC with SHA-256, SHA-512, SHA-3 and more, or a keyed BLAKE2b or BLAKE2s MAC, in your browser. The key never leaves your device.
1 to 64 bytes for BLAKE2b, 1 to 32 for BLAKE2s.
About this tool
An HMAC is a hash of a message mixed with a secret key. Anyone holding the key can recompute it to check that the message came from someone else with the key and was not changed. Webhooks, API request signing and session cookies commonly use HMAC-SHA256.
Enter a key and a message as text, hex or Base64, pick the hash, and read the HMAC in hex, Base64 or Base64URL. BLAKE2 also has its own keyed mode, defined in RFC 7693, which is faster than HMAC and is offered here at every BLAKE2b and BLAKE2s length.
Questions
- How do I verify a webhook signature?
- Compute the HMAC of the raw request body with the shared secret and the hash the service documents (usually SHA-256), then compare it with the signature header. Encode the result the same way the service does, typically hex or Base64.
- Is an HMAC the same as a hash of key + message?
- No. Hashing the key and message together is open to length-extension attacks with SHA-256 and similar hashes. HMAC, defined in RFC 2104, hashes in two nested passes to avoid that.
- Is keyed BLAKE2 the same as HMAC-BLAKE2?
- No, they give different results. Keyed BLAKE2 feeds the key into the hash’s own parameter block and needs a single pass, while HMAC wraps BLAKE2 in two passes. Use whichever the other side expects.
- Is my input sent to a server?
- No. The page loads a compiled Dart engine into a Web Worker and does all the work in your browser tab. Nothing you type or drop in is uploaded, and the tools keep working offline once the page has loaded.