How to use it
- Type or paste the secret key and choose whether it is text, hex or Base64.
- Type or paste the message, for example a webhook’s body, and choose its form the same way.
- Read the four HMACs in hex or Base64 and copy the one you need.
- To check a signature, paste it under “Signature to check”: the page says which HMAC it equals.
Rules and limits
How the HMAC is computed
- HMAC as RFC 2104 defines it, with SHA-1, SHA-256, SHA-384 or SHA-512, computed by the browser’s Web Crypto (
crypto.subtle.sign). Web Crypto refuses a key of length 0, so for an empty key the page follows the steps of RFC 2104 withcrypto.subtle.digest. - Text is encoded as UTF-8 exactly as typed, with nothing trimmed; a text box gives line breaks as LF (U+000A). For exact bytes, CRLF or binary data choose hex or Base64.
- Hex: two digits per byte, in either case; spaces, line breaks and one leading
0xare allowed. Base64: the standard or the URL-safe alphabet, padding optional, white space allowed. - Signature to check: hex in either case or Base64 (also URL-safe, padding optional), white space allowed, with or without a prefix such as
sha256=(GitHub’s form). A shorter value of at least 10 bytes that equals the start of an HMAC is reported as a truncated HMAC.
Tested limits
- Checked against Python 3.14’s
hmacmodule: 5,000 random cases (keys of 0 to 300 bytes, 524 of them empty; messages of up to 1 MB), written as text, hex or Base64 by Python’s own encoders, give the same four HMACs in hex and Base64, and the 1,474 signatures pasted among them are found under their own algorithm only. All 7 HMAC-SHA-1 vectors of RFC 2202 and all 21 HMAC-SHA-256/384/512 vectors of RFC 4231 match. Of 3,000 damaged Base64 texts the page reads exactly those that Python’s strict reader reads, to the same bytes. - At most 16 MB each for the key and the message. In Node.js 24 on the test laptop all four HMACs of a 16 MB message took 0.3 s, and reading 16 MB written as hex or Base64 0.2–1.2 s. In headless Chrome, a pasted 1 MB message of 16,384 lines showed its four HMACs 0.8 s after the paste (0.2 s of it the typing pause).
Questions and answers
Why does my webhook signature not match?
The bytes must be exactly the ones the sender signed. A copied body may have lost a trailing line break, gained spaces or been reformatted, and a text box turns CRLF into LF; paste the raw body as hex or Base64 to be sure, and check that the key is the signing secret, not an API key.
What is the difference between a hash and an HMAC?
Anyone can compute the hash of a message. An HMAC also needs the secret key, so a matching HMAC shows that the message comes from someone who has the key and was not changed on the way.
Can the key be empty?
Yes. RFC 2104 allows a key of any length, including none, and Python gives a result for it too. The browser’s Web Crypto refuses an empty key, so the page computes that one case itself and says so under the results.
Is my key stored or sent anywhere?
No. Your browser computes the HMAC and the page sends nothing. The key and the message are not even kept in this tab; only the chosen forms are remembered.