Kadben

HMAC generator

Type a key and a message, as text, hex or Base64. The page shows the HMAC with SHA-1, SHA-256, SHA-384 and SHA-512 as you type, in hex or Base64, and tells you whether a signature you paste matches one of them.

Runs in your browser. Nothing is uploaded.

HMAC generator

Nothing is trimmed: spaces and line breaks are part of the text. The key and the message are not stored.

    How to use it

    1. Type or paste the secret key and choose whether it is text, hex or Base64.
    2. Type or paste the message, for example a webhook’s body, and choose its form the same way.
    3. Read the four HMACs in hex or Base64 and copy the one you need.
    4. 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

    Tested limits

    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.

    Related tools