Generate and verify HMAC-SHA1/256/384/512 signatures.
The HMAC Generator computes a keyed hash of a message with SHA-256, SHA-1, SHA-384 or SHA-512. You can give the key as text, hex or Base64, show the result as hex or Base64, and paste an expected value to check it. It is useful for testing webhook signatures and API request signing.
HMAC stands for hash-based message authentication code, defined in RFC 2104. It combines a secret key with a hash function such as SHA-256 to produce a short tag for a message. Anyone who knows the key can recompute the tag and compare it, which shows that the message has not been changed and was produced by someone holding the key. A plain hash cannot do this, because anyone can recompute a plain hash. HMAC is widely used to sign webhook payloads, authenticate API requests and build tokens. The length of the tag matches the hash: 32 bytes for SHA-256, 20 for SHA-1, 48 for SHA-384 and 64 for SHA-512. HMAC is not encryption and does not hide the message. Compare tags in constant time on a server to avoid timing leaks.
No. A hash has no key, so anyone can compute it. An HMAC needs the secret key, so only holders of the key can produce or verify it.
The usual causes are a modified body (parsed and re-serialised JSON), a different secret, a different encoding of the key, or a different hash algorithm.
Use SHA-256 unless a service specifies otherwise. SHA-384 and SHA-512 give longer tags. SHA-1 is only for compatibility.
At least as long as the hash output is a common guideline, for example 32 random bytes for SHA-256. Use the Secret Generator to create one.
No. The HMAC is computed in the page with the browser Web Crypto API and neither the message nor the key is sent anywhere.