Skip to main content
HandyWeb

HMAC Generator and Verifier

Create the HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512 of a message with a secret key, or check a webhook signature.

Runs on your device.

Action
Algorithm
0 characters0 bytes
Key format
HMAC-SHA-256
Output format

The result appears here

How to Use It

  1. Choose the algorithm and paste the message.
  2. Enter the secret key and choose its format: text, hex, or Base64.
  3. In Generate, copy the HMAC. In Verify, paste the HMAC you received.

Questions and Answers

How is an HMAC different from a hash?

Anyone can make the hash of a message. An HMAC also needs a secret key, so it shows that the message comes from someone who has the key and that it did not change on the way.

How do I check a webhook signature?

Choose Verify, paste the raw request body as the message and the webhook secret as the key. Then paste the signature header, such as sha256=…, into the HMAC box. The sha256= prefix is removed for you.

Is the comparison safe?

Yes. Verify uses crypto.subtle.verify of the browser, which compares the values in constant time.

Good to Know

The message is read as UTF-8. If your service signs the raw request body, paste that body exactly: one extra space or line break changes the HMAC.

Source code of this toolReport a problem on GitHub