Processed on your device

HMAC generator

Compute an HMAC tag for text and a secret key, with SHA-256 or SHA-512.

1

Make it yours

No uploads

Ready when you are. Nothing runs until you choose.

2

Your result

Your result will appear here.

About HMAC generator

Use this to check a webhook or API request signature by hand, or to make a test signature while you build such a check. Enter the exact message and the shared secret, then compare the result with the signature you received. Unlike a plain hash, the result depends on the key, so only someone who holds the key can produce it. Algorithm selects the hash inside the HMAC: SHA-256 gives 64 hexadecimal characters and SHA-512 gives 128.

How it works

StillKit imports your secret key as raw UTF-8 bytes into the browser's Web Crypto interface, marked for HMAC with the hash you chose. It signs the UTF-8 bytes of your text with that key. The tag is 32 bytes with SHA-256 and 64 bytes with SHA-512, shown as lowercase hexadecimal characters. The key is used for this one calculation and is not kept afterwards.

Tips

  • The key is used exactly as typed. If your provider gives the secret in hex or Base64, the result only matches when that encoded text is itself the key.
  • Many services sign the raw request body together with a timestamp or other fields. Rebuild the message exactly as their documentation describes, including line breaks.
  • Paste the message exactly as received, because reformatting JSON or adding a final line break gives another tag.
  • CR LF line breaks become single line feeds in the text box, so a message that contains them cannot be checked here.
  • With the key key and the text The quick brown fox jumps over the lazy dog, the result starts f7bc83f4 with SHA-256 and b42af090 with SHA-512, both widely published test values.
GOOD TO KNOW

Limits

Maximum 1 MB of text. The key is read as UTF-8 text, not as hex or Base64. No key is saved. Do not use the public example key for real authentication.

How tools run on your device →

Questions and answers

Should I choose SHA-256 or SHA-512?

Use the one named in the documentation of the service whose signature you are checking, often written HMAC-SHA256 or HS256, HMAC-SHA512 or HS512. The 2 give unrelated tags. A signature of 64 hexadecimal characters points to SHA-256, one of 128 to SHA-512.

Why does my result not match the signature I received?

Check 3 things: the message must be byte for byte what was signed, the key must be the secret as text, and the encoding must agree. A signature sent in Base64 will not look like this hexadecimal tag even when both are right.

Does a matching HMAC keep the message secret?

No. It shows that the message came from someone who holds the key and was not changed on the way, but the message itself stays readable. To hide the content as well, use AES-GCM text encryption.

Find your next shortcut

Search loads only when needed. Your search stays on your device.

Browse all categories and sections →