Skip to main content
Uttir

HMAC Generator

Compute a Hash-based Message Authentication Code (HMAC) for any message and shared secret. Supports SHA-256, SHA-512, SHA-1, and MD5. All computation runs in your browser.

HMAC Generator — HMAC (Hash-based Message Authentication Code, RFC 2104) is the standard way to verify both the integrity and authenticity of a message. Given a message and a shared secret, it produces a fixed-size tag that only the holder of the same secret can recompute.

Computation runs entirely in your browser. Your message and secret never leave this device.

Was HMAC Generator useful?

What is HMAC Generator?

HMAC (Hash-based Message Authentication Code, RFC 2104) is the standard way to verify both the integrity and authenticity of a message. Given a message and a shared secret, it produces a fixed-size tag that only the holder of the same secret can recompute.

This tool uses the RFC 2104 algorithm directly (no library magic) and outputs the MAC in hex. All computation runs in your browser, so even sensitive secrets never leave the device.

How to use it

  1. Pick an algorithm

    SHA-256 is the modern default. SHA-1 / MD5 are kept for compatibility with legacy systems; do not use them for new work.

  2. Enter the secret and message

    Secrets can be plain text or a hex string prefixed with "hex:". Messages are plain UTF-8 text.

  3. Copy the hex MAC

    Use the hex output directly in HMAC headers (e.g. X-Hub-Signature-256) or as a binary comparison key.

Examples

Standard HMAC-SHA256 API test vector

Sign a plain string with a shared secret key and inspect lowercase hex output.

Message: "hello world" | Secret: "my-secret" | Algorithm: SHA-256

Result: cf405b2def200d91098da8663e531d579ae1c71c90fe73d623ae2138eef2ad8b

Webhook payload authentication check

Verify an incoming query or webhook signing secret against a known HMAC-SHA256 digest.

Message: "amount=100&currency=USD" | Secret: "whsec_demo" | Algorithm: SHA-256

Result: 8e203bcc3e01b6e5970ad5460ed01c275278c09e2b5ac01f776e7c45a5a8ecb7

Frequently asked questions

Related guides

Related tools