How to use
- Paste the payload exactly as it was received or will be sent.
- Enter the secret key.
- Choose the algorithm (HMAC-SHA256 is the most common).
- Select hex or Base64 to match the service's format and copy the signature.
Use cases
- Validating webhook signatures from Stripe, GitHub, Shopify and payment gateways.
- Signing requests between microservices.
- Investigating why the signature computed by your back end does not match.
Technical concepts
How HMAC works
HMAC (RFC 2104) combines a hash function with a secret key: H((K ⊕ opad) || H((K ⊕ ipad) || message)). Only someone who knows the key can produce the correct signature, which guarantees the message's authenticity and integrity.
Byte for byte
The signature depends on every byte of the payload. Reformatting JSON, reordering keys or changing line endings produces a different signature. Always sign the raw request body, before any parsing.
Constant-time comparison
On the server, compare signatures with constant-time functions (crypto.timingSafeEqual in Node, hmac.compare_digest in Python) to prevent timing attacks.
Frequently asked questions
Is my secret key stored?
No. The key only exists in the page's memory and is used by the local Web Crypto API.
Why doesn't my signature match the service's?
The usual causes are a payload altered by parsing, a different output encoding (hex vs Base64) and prefixes such as sha256= or timestamps that the service concatenates before signing.
Is HMAC-SHA1 still secure?
Yes for HMAC: SHA-1 collisions do not break the HMAC construction in practice. Still, prefer SHA-256 for new systems.