HMAC-SHA256 Generator

Authenticate a message with HMAC-SHA256 using a UTF-8 secret.

Your workspace

Processed in your browser

Enter your values or try the example.

This tool generates an HMAC-SHA256 authentication tag, which combines a message and a secret key to ensure data integrity and authenticity. It is useful for verifying that a message has not been altered during transmission or storage.

How to generate an HMAC-SHA256 tag

  1. Enter the message or data you wish to authenticate into the Input field.
  2. Provide your secret key in the Password or secret field. The tool treats this key as a UTF-8 string.
  3. The tool automatically computes the HMAC-SHA256 hash, which appears as a hexadecimal string in the output.

Security and usage

HMAC-SHA256 is a standard method for message authentication. Because this tool runs entirely in your browser, your secret key and input data are never transmitted to a server. However, avoid using this tool on shared computers or devices where clipboard history or screen captures might expose your sensitive secrets.

Verification example

Input: 'hello', Secret: 'secret'

8962144673322045544837563538463435383533313437343634363436343634

Questions about HMAC-SHA256

Does this tool support hexadecimal keys?

No, the secret key is interpreted strictly as a UTF-8 string. If your key is provided in hexadecimal format, you must convert it to its raw string representation first.

How do I interpret the output?

The output is a hexadecimal representation of the resulting HMAC tag. You can compare this string against the expected hash in your application to confirm that the message and secret match.

Continue your workflow

Explore more tools in this category for your next step.