How hmac generator works
HMAC (Hash-based Message Authentication Code) combines a cryptographic hash function with a secret key to produce a code that both verifies data integrity and authenticates the sender. Unlike a plain hash, an HMAC requires the shared secret, so an attacker cannot forge a valid code without the key. HMACs are widely used in API signing (e.g. AWS SigV4, webhooks), message integrity, and session tokens.
This generator uses the Web Crypto API (crypto.subtle) to import your secret key and sign your message with HMAC over SHA-256, SHA-1, SHA-384 or SHA-512. SHA-256 is the standard choice; SHA-1 is provided for legacy compatibility only and should be avoided for new security work. The result can be returned as lowercase hex or base64.
All computation happens in your browser, so your secret key never leaves your device. The same message and key always produce the same HMAC, while any change to either produces a completely different code. Keep your secret key private: anyone who holds it can generate valid HMACs for your messages.