HMAC

Generate a keyed hash (HMAC) from a secret and a message using the Web Crypto API. Choose the hash and read the result in hex and Base64.

Generate a keyed hash (HMAC) from a secret and a message using the Web Crypto API. Choose the hash and read the result in hex and Base64.

How to use

  1. Pick the hash algorithm (SHA-256 by default)
  2. Enter the secret key and the message
  3. The HMAC updates live in hex and Base64
  4. Copy whichever encoding you need

Frequently asked questions

What is an HMAC used for?

Verifying message integrity and authenticity — webhooks, API signatures and tokens use HMAC to prove a message wasn't tampered with.

Is HMAC the same as a plain hash?

No. HMAC mixes in a secret key, so unlike a bare SHA-256 it can't be forged without the key.

Is my key sent anywhere?

No — the HMAC is computed in your browser via Web Crypto and nothing leaves the page.