Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

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.

How to use HMAC Generator online

  1. Type the message. The exact text to sign.
  2. Type the key. The shared secret.
  3. Pick hash and output. SHA-256 and hex are the common choices.
  4. 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?
To prove that a message came from someone with the key and was not changed.
Is HMAC the same as a hash?
No. An HMAC needs a secret key, and a plain hash does not.
Which hash should I use?
SHA-256 is the usual choice. SHA-1 is kept for older systems.
Does it encrypt the message?
No. The message stays readable.
Is my key sent anywhere?
No. The calculation runs in your browser.
Is the HMAC Generator private?
It stays in your browser tab; the HMAC Generator sends nothing anywhere.
Is there a way to reuse the HMAC Generator result?
Copy the HMAC Generator result, or save it as a text file from the result box.

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.

More tools in Text & Writing Tools →

Search tools