Skip to main content

HMAC Generator

HMAC Generator computes a keyed-hash message authentication code in your browser.

HMAC authenticates a message with a shared secret. It does not encrypt the message.

The result depends on both the message and the key. Anyone with the same secret and message can reproduce the same HMAC.

Processed locally in your browser

How to use it

  1. Enter or paste the message you want to authenticate
  2. Enter the shared secret key (use Show key to check it, Hide key to mask it again)
  3. Choose HMAC-SHA-256, HMAC-SHA-384, or HMAC-SHA-512
  4. Click Generate HMAC, then copy the hexadecimal or Base64 result

You give it a message and a shared secret key, pick HMAC-SHA-256, HMAC-SHA-384, or HMAC-SHA-512, and it returns the authentication code in two forms at once: lowercase hexadecimal and standard Base64. Both the message and the key are read as UTF-8 text, so accents, non-Latin scripts, and emoji are handled correctly. The result is deterministic: the same message, the same key, and the same algorithm always produce the same code, and changing a single character of either input changes the whole output. HMAC is built on a hash function but, unlike a plain hash, it mixes in a secret key — so it lets someone who holds the same secret check that a message was created or approved by a party that also holds it, and that it was not altered in transit. An empty message is accepted (it has a valid HMAC); an empty key is not, because the key is the whole point. HMAC does not encrypt the message: the message text is never hidden or transformed, only summarised into a fixed-length code. A matching HMAC only shows equivalence relative to the key and message used; whether that means anything depends entirely on how the shared secret is generated, distributed, and stored. Everything runs locally through the browser's Web Crypto API — the message, the key, and the code are never uploaded, logged, or stored anywhere. Unlike the SHA Hash Generator, which hashes text with no key, the Secure Token Generator, which produces random secrets, or the JWT Decoder, which inspects an existing token, this tool takes a message plus a key and returns one keyed authenticator.

FAQ

We use cookies to run this site and, with your consent, to understand usage and personalize ads. You can change your choice at any time.