HMAC Generator
This tool creates an HMAC of a message with a secret key. It supports SHA-256, SHA-1, SHA-384 and SHA-512, and writes the result as hex or Base64.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use HMAC Generator online
- Type the message. The exact text to sign.
- Type the key. The shared secret.
- Pick hash and output. SHA-256 and hex are the common choices.
- Copy the result. Copy or save the value.
Why use this free HMAC Generator
- Four hash choices
- Hex or Base64 output
- Browser WebCrypto
- Known test value
- Sizes shown
- Share by link
What an HMAC is
An HMAC, or hash-based message authentication code, is a short value made from a message and a secret key. Only someone with the key can make the right value for a message, so it shows that the message came from a holder of the key and was not changed on the way. Web services use HMACs to sign requests and webhooks.
How to use it
Type the message and the key, pick a hash and the output form. The result appears at once. The same message, key and hash always give the same value, and a tiny change to any of them gives a very different one. Your browser’s built-in crypto does the calculation, so the values match those of other tools.
A worked example
With the key "key" and the message "The quick brown fox jumps over the lazy dog", HMAC-SHA-256 gives f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8. That is 64 hex characters, which is 32 bytes. SHA-1 would give 40 characters, SHA-384 would give 96 and SHA-512 would give 128. This pair is a well-known test value, so you can use it to check other code.
Checking a signature
To verify a webhook, compute the HMAC of the exact body you received, using the shared secret, and compare it with the signature sent. The body must be byte for byte the same, so do not reformat it. In real code, compare values in constant time, which a web page cannot do for you.
Handling keys
Everything is computed in your browser and nothing is sent. Even so, avoid pasting a live production key into any web page you do not control, and use a test key where you can. An HMAC does not encrypt the message; anyone can read it. It only proves who made it and that it is unchanged.
Using the tool
The HMAC Generator works again whenever the text or an option changes. Use result as input to pass the answer to the next step.
HMAC Generator: frequently asked questions
What is an HMAC used for?
Is HMAC the same as a hash?
Which hash should I use?
Does it encrypt the message?
Is my key sent anywhere?
Is the HMAC Generator private?
Is there a way to reuse the HMAC Generator result?
Related searches for HMAC Generator
- HMAC Generator online
- free HMAC Generator
- HMAC Generator online free
- HMAC Generator for mobile
- HMAC Generator without sign up
- HMAC Generator – Text & Writing Tools
HMAC Generator is a free online tool on MAITBOX, in the Text & Writing Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.