HMAC Generator
Generate a keyed HMAC of a message using a secret key and your choice of hash algorithm.
Share on Social Media:
Generate an HMAC (Hash-based Message Authentication Code) for a message using a secret key of your choice, with support for MD5, SHA-1, SHA-256, SHA-384, SHA-512, and SHA3-256. HMACs are used to verify both the integrity and authenticity of a message — anyone without the secret key cannot produce a matching HMAC.
Frequently Asked Questions
A plain hash only depends on the message, so anyone can compute it. An HMAC also depends on a secret key, so it proves the message came from someone who knows that key — this makes it useful for verifying authenticity, not just integrity.
SHA-256 is a strong, widely supported default for most use cases. SHA-384 and SHA-512 offer a larger output for extra margin, while MD5 and SHA-1 are older and best avoided for new systems.
HMACs are widely used to sign API requests (verifying a request came from someone with the shared secret), verify webhook payloads, and authenticate JWT tokens signed with the HS256 algorithm.
Best practice is to use separate keys for different cryptographic purposes (like HMAC authentication vs. encryption) to avoid subtle security weaknesses that can arise from key reuse across algorithms.