Skip to content
Tools

HMAC Generator

Compute a keyed HMAC signature with SHA-1 to SHA-512.

Local
HMAC (hex)

What this tool does

This tool computes an HMAC: a keyed hash that proves a message came from someone who holds the secret key and has not been changed. Enter a key and a message, pick an algorithm, and the HMAC appears in hex.

HMAC versus a plain hash

A plain hash can be recomputed by anyone, so it only detects accidental changes. An HMAC mixes in a secret key, so only someone with the key can produce or verify it. That is why HMAC is used to sign API requests, webhooks and tokens.

Good to know

The computation uses the browser Web Crypto implementation. Prefer SHA-256 or stronger. Keep your secret key secret: anyone who has it can forge a valid HMAC. For verifying a webhook, compute the HMAC of the payload and compare it to the signature the sender provided.

Common use cases

  • Signing or verifying a webhook or API request.
  • Reproducing a signature while debugging an integration.
  • Checking that a message and its signature agree.

Frequently asked questions

What is HMAC for?
It proves a message came from someone holding the secret key and was not changed. It is used to sign API requests, webhooks and tokens.
How do I verify a webhook?
Compute the HMAC of the payload with the shared secret and compare it to the signature the sender provided.

Learning resources

Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.

Feedback welcome

Found a bug in this tool, or want it to do something it does not? Tell us and we will take a look.