Compute an HMAC with SHA-256, SHA-384 or SHA-512 using Web Crypto. It is how many services sign webhooks: sender and receiver share a key and compare the HMAC of the received body.
Key and message can be UTF-8 text, hex or Base64, and the output hex or Base64, to match your provider’s format.
How to use it
- Paste the exact message (for example the raw webhook body, not reformatted).
- Paste the key and choose its format.
- Choose the algorithm and output format, then press Run.
Example
{"event":"order.paid","id":"evt_123"}
clave-webhook-de-pruebas-0123456789abcdef 82df7de8e25ebf4e1d18c7f950d2ecbf50f012dfa8b40f5ca113a39655b4f58f Limitations
- Use test keys whenever possible; the key is processed in memory and never stored.
- When comparing HMACs on your server, use a constant-time comparison.
- You are warned when the key is shorter than the hash output.
FAQ
- My HMAC does not match the webhook’s. What should I check?
- That the message is the exact body bytes (no JSON reformatting), the key format is right and you compare the same output format.
- Does HMAC encrypt the message?
- No. It provides integrity and authenticity to whoever knows the key, but the message stays readable.