Report Tool or Give Us Suggestions

HMAC Generator

Generate HMAC digests using common hash algorithms in your browser.

L ading . . .

HMAC Generator

Use this HMAC generator to create keyed message authentication codes directly in your browser. Choose an algorithm, enter your secret key and message, and instantly get an HMAC output in hex or base64 format. Everything runs client-side, so sensitive text stays on your device.

What is HMAC?

HMAC (Hash-based Message Authentication Code) combines a cryptographic hash algorithm with a secret key. This produces a digest that helps verify data integrity and authenticity. If either the message or key changes, the generated HMAC changes as well.

Common HMAC use cases

  • Signing API requests between clients and servers
  • Verifying webhook payload integrity
  • Protecting tokens and session data from tampering
  • Creating deterministic signatures for message authentication

Prefer modern algorithms such as HMAC-SHA256 or HMAC-SHA512 for stronger security in production systems.

Frequently Asked Questions

Is this HMAC tool secure to use?

The computation runs in your browser, and your inputs are not sent by this tool to a backend. Still, only use trusted devices and secure environments when working with secret keys.

Which algorithm should I choose?

HMAC-SHA256 is usually the default choice for compatibility and security. HMAC-SHA512 is also strong, while SHA1 and MD5 are mainly for legacy integrations.

Why does my output differ from another implementation?

Make sure the message, key, encoding, and line endings are exactly the same. Even small differences like extra spaces or newline characters produce different HMAC values.

What is the difference between hex and base64 output?

Both represent the same binary HMAC bytes. Hex is longer and easier to inspect manually, while base64 is shorter and often preferred for headers or compact payloads.