HMAC Generator
Sign a message with a secret key using HMAC-SHA256 and related algorithms.
Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.
How to use the hmac generator
- Enter the secret key and choose an algorithm.
- Paste the exact message payload.
- Copy the hex or Base64 signature.
About this tool
HMAC combines a message with a secret key to produce a signature that proves two things at once: the message came from someone holding the key, and it has not been altered in transit. It is what webhook providers use to let you verify that a callback genuinely came from them.
The most common reason a signature will not match is not the key — it is the payload. Whitespace, line endings and the exact JSON serialisation are all part of the signed message, so sign the raw body bytes rather than a re-serialised object.
Use a test secret here. The signing happens in this page and nothing is transmitted, but a production webhook key should not be pasted into any website, including this one.
Common uses
- Reproducing a webhook signature while debugging.
- Checking an API request signing implementation.
- Generating a signed value for a test.
Frequently asked questions
- Why does my signature not match the provider's?
- Almost always the payload rather than the key. Sign the exact raw bytes received, including whitespace and line endings — re-serialising JSON changes them.
- Hex or Base64?
- Whichever your provider specifies; both encode the same bytes. GitHub uses hex, several others use Base64.
Related tools
SHA-256 Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text using the Web Crypto API.
File Hash & Checksum
Hash any file with SHA-1, SHA-256, SHA-384 and SHA-512, and compare against a published checksum.
JWT Decoder
Decode a JSON Web Token to inspect its header, payload, expiry and claims.
Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 back to text, with UTF-8 and URL-safe support.