HMAC Generator
Create a keyed hash (HMAC) of a message using your browser’s Web Crypto API. Useful for checking webhook signatures and API request signing — the key never leaves this tab.
Message, key and algorithm
Limits
- The key and the message stay in this tab. They are not saved.
- Supported algorithms: HMAC-SHA-1, HMAC-SHA-256, HMAC-SHA-384 and HMAC-SHA-512. MD5-HMAC and SHA-3 are not offered.
- The key must not be empty. Hex keys need an even number of hex digits; Base64 keys must be standard Base64 (not base64url).
- The input is limited to 2 MB of UTF-8 text (8 MB if you load a file). Larger files can run out of memory in a phone browser tab.
- Files are hashed from memory, so a very large file (tens of megabytes on a phone) may fail.
HMAC
How to use HMAC Generator
- Enter the message and keyType or paste the message, or load a file. Enter the secret key as UTF-8 text, hex or Base64.
- Choose the algorithmPick HMAC-SHA-1, SHA-256, SHA-384 or SHA-512, and hex or Base64 output.
- Copy the digestThe HMAC is computed locally and can be copied or downloaded.
How the HMAC is computed
An HMAC is a hash of your message that also uses a secret key, so anyone who only has the message cannot produce the same digest. This page calls crypto.subtle.sign with the HMAC algorithm your browser already implements.
SHA-256 and SHA-512 are the usual choices for new work. SHA-1 is still used by some older APIs; it is not broken for HMAC in the same way as for collision-resistant signatures, but you should prefer SHA-256 or stronger when you can.
Frequently asked questions
Is my text or file uploaded?
No. Everything runs in your browser tab with JavaScript. Nothing you type, paste or drop is sent to a server, logged or stored by ALink Tools.
Which HMAC should I use?
Use HMAC-SHA-256 unless an API you are calling documents another algorithm. Do not invent a new scheme by concatenating a key and a hash yourself.
Can I verify a webhook signature here?
Yes, if the service uses one of the SHA-1/2 HMAC algorithms. Compute the HMAC of the exact raw body they signed and compare it with the hex or Base64 value they sent. This page does not implement AWS SigV4, Stripe’s timestamped scheme, or timing-safe comparison in a server.
Is SHA-1 safe for HMAC?
HMAC-SHA-1 is still widely accepted, but SHA-256 or SHA-512 is the better default for new systems.
Related tools
All toolsHash Generator
MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files.
JWT Decoder
Decode a JSON Web Token in your browser. Claims are never treated as trusted.
Password Generator
Generate strong random passwords and passphrases with your browser’s secure random generator.
Base64 Encoder & Decoder
Encode or decode UTF-8 text, URL-safe Base64, and local files.