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.
How to use it
- Enter or paste the message you want to authenticate
- Enter the shared secret key (use Show key to check it, Hide key to mask it again)
- Choose HMAC-SHA-256, HMAC-SHA-384, or HMAC-SHA-512
- 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
HMAC, a keyed-hash message authentication code, combines a message with a secret key and a hash function to produce a short code that a holder of the same key can recompute and compare.
A plain hash such as SHA-256 needs only the message, so anyone can compute it. HMAC also needs a secret key, so only key holders can produce or check the resulting code.
No. HMAC does not encrypt anything. The message is not hidden or made unreadable; HMAC only produces a fixed-length authentication code derived from the message and the key.
Follow whatever the system you need to interoperate with specifies. If you are free to choose, HMAC-SHA-256 is a common default; SHA-384 and SHA-512 produce longer codes.
No. The key and message are processed only in your browser through the Web Crypto API. Nothing is sent to a server, written to storage, or logged, and closing the tab discards both.