HMAC Generator
Enter a message and a secret key, pick a hash algorithm, and generate an HMAC signature locally using the Web Crypto API.
Message & key
LocalSignature
About HMAC Generator
The HMAC Generator produces a keyed hash signature from a message and secret key using a chosen algorithm, computed locally with the Web Crypto API. It is for developers signing requests, verifying webhooks, or building message-authentication checks.
HMAC proves a message came from someone holding the shared key and was not altered. Computing it locally keeps the secret key in your browser rather than sending it to a server.
Step by step
- Enter the message you want to sign.
- Provide the secret key.
- Choose the hash algorithm, such as SHA-256.
- Generate the HMAC signature.
- Copy the signature for your request or comparison.
What it offers
- Keyed HMAC over a chosen hash algorithm
- Web Crypto API computation
- Message and key input
- Runs entirely in the browser — HMAC
Where it helps
- Signing API requests that require an HMAC header
- Verifying a webhook signature against its payload
- Generating a message-authentication code for testing
- Checking that an HMAC implementation matches expected output
Tips for best results
- Use a long, random secret key and keep it out of source control.
- Match the exact algorithm and message encoding the receiving system expects.
- On the server, compare HMACs with a constant-time function to avoid timing attacks.
Pitfalls to watch for
- Reusing a weak or guessable secret key, which undermines the whole signature.
- Comparing signatures with a plain equality check in code, which can leak timing; use a constant-time comparison server-side.
- Signing the wrong representation of the message, such as before rather than after encoding.
Why people use it
Authenticity check
Confirms a message’s origin and integrity with a shared key.
Algorithm choice
Pick the hash that matches your specification.
Key stays local
The secret is used in your browser, not uploaded.
Standard
Uses the audited Web Crypto implementation.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.