🔑 HMAC Generator

Generate HMAC signatures with SHA algorithms. Runs in your browser.

Last updated: November 8, 2026 · By the BoltQuickTools team

Enter a message and secret key to generate an HMAC signature.
Message bytes: 0 | Key bytes: 0
No comparison yet.

Reproduce a webhook or API signature by hand

When a webhook handler rejects requests with "invalid signature", you need to work out whether your code or your input is wrong. This page computes the HMAC for a message and key so you can compare it with what your code or the sender produced. Signing uses the browser's crypto.subtle, and the page's code does not send your message or key anywhere. Even so, a test secret is the sensible thing to paste into any web page.

Producing and comparing a signature

  1. Choose Hash Algorithm (HMAC-SHA1, HMAC-SHA256, HMAC-SHA384 or HMAC-SHA512) and Output Format (Hex, Base64 or Base64URL).
  2. Fill in Message and Secret Key. The signature appears shortly after you stop typing, or press Generate.
  3. Paste a known value into Optional: Compare with Expected Signature to get a match or no-match result.
  4. Copy Signature, Load Sample and Clear do what their names say.

The built-in sample, worked through

Load Sample fills these two fields:

Message:     {"event":"payment.succeeded","amount":1999,"currency":"USD"}
Secret Key:  super_secret_key_123

The line under the buttons reads Message bytes: 60 | Key bytes: 20. With HMAC-SHA256, the three output formats are:

Hex        018274a788fcec238181048e3079b9daaecabbbeefa518dc220f08c521bf8935
Base64     AYJ0p4j87COBgQSOMHm52q7Ku77vpRjcIg8IxSG/iTU=
Base64URL  AYJ0p4j87COBgQSOMHm52q7Ku77vpRjcIg8IxSG_iTU

Why a signature can fail to match

Signing questions

Can the message be empty?

Yes. An empty message still produces a signature. The key cannot be empty: the page shows Enter a secret key to generate a signature. instead.

Is an HMAC the same as encrypting the message?

No. The message stays readable. The signature only proves that someone holding the key produced this exact text. Compare with a plain digest from the hash generator, which involves no key.

Can I use this to build or check a JWT?

A signed JWT with HS256 is an HMAC over the header and payload in Base64URL form, so the Base64URL output format is the right one to compare. The JWT generator and JWT decoder handle the token structure for you.