HMAC Generator

Last updated: October 16, 2026  •  Published by: NOFYI Editorial Team  •  Category: Security Tools

Workspace

What Is the HMAC Generator?

The NOFYI HMAC Generator computes a Hash-based Message Authentication Code for a message you supply, using a secret key you supply. HMAC mixes the key into the hash, so the same message with a different key gives a different code, and anyone with the key can recompute the code to check that the message was not changed. Use it to create test signatures, webhook signatures, and API message checks.

How to Use the HMAC Generator

  1. Open the HMAC Generator page.
  2. Type or paste the message into the Message field.
  3. Type the secret key into the Secret Key field.
  4. Choose the algorithm. SHA-256 is selected by default; SHA-512 and SHA-1 are also offered.
  5. Click Process.
  6. Use Copy to copy the hexadecimal result, or Download to save it.

Worked Example

Message: Hello, World!

Secret key: secret-key

Algorithm: SHA-256

Observed output on this site:

HMAC-SHA256: 16ee525f6c944ff49a368cd593eb7b72883b14456c7b583bba4ff973ff4b30f9

The result is 64 hexadecimal characters, as expected for SHA-256. Changing any character of the message or the key changes the code completely, so the receiving side must use the exact same message, key, and algorithm to reproduce it.

Limitations

  • The result is shown in hexadecimal only in the observed workspace; no Base64 output option was shown.
  • There is no built-in verify mode; to verify, recompute the code with the same inputs and compare the strings yourself.
  • There is no file mode; the tool works on text typed or pasted into the Message field.
  • The secret key is typed into a plain field, so do not enter a real production key on a shared screen or paste a real secret into a page you do not trust.
  • SHA-1 is offered but is weaker than SHA-256 and SHA-512; prefer SHA-256 for new checks.
  • HMAC proves that the holder of the key produced the code; it does not encrypt the message or prove who sent it to a third party.

Frequently Asked Questions

What is HMAC used for?

HMAC is used to check integrity and authenticity: the sender computes a code from the message plus a shared secret, and the receiver recomputes it with the same secret. If the codes match, the message was not altered by someone without the key.

Which algorithm should I choose?

Use SHA-256 for most test and webhook work; it is the default here and gives a 64-character hexadecimal code. SHA-512 gives a longer code. Avoid SHA-1 for new uses because it is weaker.

Should I share the secret key?

No. Anyone with the key can create a valid code for any message. Share keys only through a safe channel, and use test keys for examples, not production secrets.

Why is my code different from a colleague code?

Any difference in the message, key, algorithm, or text encoding gives a different code. Check for extra spaces, line breaks, or a different key, and recompute with the exact same inputs.