HMAC & Webhook Verifier
// HMAC-SHA256 · SHA-384 · SHA-512 · GitHub, Stripe & Slack webhooks
Algorithm
HMAC-SHA256 signature
Enter a secret and a message to see the signature.
Provider
The body must be byte-for-byte what the provider sent. Re-formatted JSON (different spacing or key order) won't match. Browsers also turn Windows line breaks (CRLF) into LF when you paste, so a CRLF payload can't be checked here.
Reference
| Algorithm | Output | Hex chars | Recommended key | Common use |
|---|---|---|---|---|
| HMAC-SHA256 | 32 bytes | 64 | 32+ random bytes | JWT HS256, GitHub, Stripe and Slack webhooks, API signing |
| HMAC-SHA384 | 48 bytes | 96 | 48+ random bytes | JWT HS384 |
| HMAC-SHA512 | 64 bytes | 128 | 64+ random bytes | JWT HS512 |
| HMAC-SHA1 | 20 bytes | 40 | 20+ random bytes | Legacy only (GitHub X-Hub-Signature, old APIs) |
- HMAC is symmetricThe same secret signs and verifies, so anyone who can verify can also forge. Keep the secret server-side only.
- Use a random keyUse at least as many random bytes as the hash output, not a human password.
- Compare in constant time on your serverUse your language's timing-safe comparison (hmac.compare_digest, crypto.timingSafeEqual, hash_equals) rather than ==.