ToolPuma Logo

HMAC Generator

Generate an HMAC using MD5, SHA-1, SHA-256, or SHA-512.

What Is a HMAC Generator?

The HMAC Generator computes a keyed-hash message authentication code using MD5, SHA-1, SHA-256, or SHA-512. An HMAC combines a secret key with a message using a cryptographic hash function, proving both the integrity of the message and that the sender possessed the key. It is widely used in API authentication and token signing.

How to Use This HMAC Generator

  1. 1
    Choose AlgorithmSelect the underlying hash (MD5, SHA-1, SHA-256, or SHA-512) from the dropdown.
  2. 2
    Enter KeyType or paste the secret key used to compute the HMAC.
  3. 3
    Enter MessageType the message to authenticate, then copy the resulting HMAC.

Frequently Asked Questions

A plain hash has no key and can be computed by anyone. An HMAC is keyed, meaning only someone with the secret key can generate or verify it. This provides message authentication, not just integrity.
HMAC-SHA256 is the most common and recommended default. HMAC-SHA512 offers a larger output for maximum security, while HMAC-MD5 and HMAC-SHA1 should be avoided for new systems.
HMACs secure API requests (e.g., AWS Signature V4), sign JWTs, and are used in TLS, payment systems, and webhook verification.