What is HMAC Generator?
HMAC Generator — An HMAC Generator is a free tool that creates Hash-based Message Authentication Codes using a secret key and a hash algorithm to verify data integrity and authenticity.
Loading your tools...
Generate HMAC-SHA256, HMAC-SHA512, HMAC-SHA1, and HMAC-MD5 signatures from a message and secret key. Verify webhook signatures from Stripe, GitHub, Slack, and Shopify. Output in hex or Base64 format. Essential for API request signing, webhook payload verification, and message authentication.
HMAC Generator: Enter a message and secret key, select a hash algorithm (SHA-256, SHA-512, etc.), and get the HMAC output instantly. Use it for API authentication, webhook verification, and message integrity checks.
The secret key is used to sign the message.
All computations happen directly in your browser. Your message and secret key never leave your device.
Supports standard algorithms like SHA-256 (standard for JWTs) and legacy MD5 for compatibility.
HMAC Generator — An HMAC Generator is a free tool that creates Hash-based Message Authentication Codes using a secret key and a hash algorithm to verify data integrity and authenticity.
Paste the exact message or webhook payload body — whitespace and encoding must match exactly.
Enter the shared secret key provided by your API service (Stripe webhook secret, GitHub secret, etc.).
Select the hash algorithm (HMAC-SHA256 is most common) and output format (hex or Base64).
Compare the generated HMAC signature with the one in your webhook header or API response.
Verifying Stripe, GitHub, Slack, and Shopify webhook signatures
Debugging API request signing for AWS Signature v4 and custom HMAC auth
Testing HMAC implementations across Node.js, Python, Go, and PHP
Validating message integrity for secure inter-service communication
HMAC combines a secret key with a hash function to produce a signature that verifies both the integrity and authenticity of a message. Unlike plain hashing (SHA-256 alone), HMAC prevents length extension attacks and ensures that only parties with the shared secret can generate valid signatures. HMAC-SHA256 produces a 64-character hex string regardless of input size.
The most common cause of HMAC signature mismatches is payload canonicalization — extra whitespace, different line endings (CRLF vs LF), or JSON key ordering can change the signature even when the content appears identical. Always use the raw request body bytes for webhook verification, not a parsed-and-re-serialized version.