What is the HMAC Generator?
HMAC (hash-based message authentication code) combines a secret key with a message to produce a signature. Anyone who knows the key can recompute it, so the receiver can check that the message came from the sender and was not changed. Payment providers, GitHub, Slack, Shopify and most webhook systems sign their requests this way, usually with HMAC-SHA256.
This HMAC generator uses your browser's Web Crypto API. The key and message stay on your device, which matters because a webhook secret should never be pasted into a site that sends it to a server.
How to use the HMAC Generator
- Paste the exact message, for example the raw webhook request body.
- Enter the secret key and choose whether it is plain text, hex or Base64.
- Choose the algorithm. Most services use HMAC-SHA256.
- Copy the hex or Base64 signature, or paste a received signature into Compare to verify it.
Frequently asked questions
Why does my webhook signature not match?
The most common cause is a changed message: the body must be the raw bytes the sender signed, before any JSON parsing or pretty-printing. Also check the key format (some secrets are Base64), the algorithm, and whether the provider signs a timestamp together with the body, as Stripe and Slack do.
Is HMAC the same as a hash?
No. A plain hash like SHA-256 can be computed by anyone. An HMAC also needs the secret key, so only parties that know the key can create a valid signature.
Is HMAC-SHA1 still safe?
HMAC-SHA1 is not broken in the way plain SHA-1 is, and some older APIs still use it. For new systems, use HMAC-SHA256 or stronger.