UTILS.
Private by default
⌥

HMAC Generator

Generate an HMAC signature for a message using a secret key and chosen hash.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Create keyed-hash message authentication codes in your browser using the WebCrypto API; nothing is sent anywhere.

Type a message and a secret key, choose SHA-256, SHA-1, SHA-384 or SHA-512 and press Generate. The result is the HMAC as lowercase hexadecimal, computed with the WebCrypto API. It does not update as you type, so press Generate again after changing any field.

The key must not be empty, but the message may be. The key is entered as plain text and encoded as UTF-8, not read as hex or Base64, so a hex key from another system would be used as text and give a different result than the raw bytes. The tool only generates codes and cannot check a received one.

Frequently asked questions

Which algorithms are supported?
SHA-256, SHA-1, SHA-384 and SHA-512, selected from the dropdown before you generate.
What encoding is the key in?
Both the message and key are treated as UTF-8 text, and the signature is shown as lowercase hexadecimal.
Why does my result differ from my server's?
The usual causes are a different hash algorithm, a key the server treats as raw bytes instead of text, or a message that differs by a space or line break. Both sides must use identical input.
Why does the result not change when I edit the message?
The code is only calculated when you press Generate. Press it again after changing the message, key or algorithm.

More tools