๐Ÿ” HMAC Calculator

Enter a secret key

Enter a secret key and a message to compute an HMAC (keyed-hash message authentication code) live in your browser. Supports SHA-1, SHA-256, SHA-384, and SHA-512. All computation happens via the Web Crypto API and never leaves your browser.

How to use

  1. Enter a secret key.
  2. Enter the message to sign.
  3. Select a hash algorithm.
  4. The HMAC value is shown automatically in both hex and Base64.

FAQ

What is HMAC?

A mechanism that combines a secret key with a hash function to simultaneously detect tampering and authenticate the sender of a message. Itโ€™s used for signing API requests, verifying webhooks, and similar tasks.

Is this calculation correct?

It has been verified against the official HMAC-SHA256 test vectors defined in RFC 4231, and cross-checked against Node.jsโ€™s standard cryptography library.

How is this different from a plain hash (like SHA-256)?

Anyone can compute a plain hash, but only someone holding the secret key can compute or verify a correct HMAC โ€” making it suitable for authentication and message-authenticity checks.