About this tool
To test a webhook endpoint locally, its signature check must pass, which means signing the payload exactly as the provider does. Each provider signs a slightly different string and encodes the result differently. This generator does it for the most common schemes, shows the exact string that was signed, and gives you a curl command that posts the signed request to your server.
Signing runs in your browser with the Web Crypto API. Use test secrets, not production ones.
Signature schemes
| Provider | Header | What is signed | Encoding |
|---|---|---|---|
| Stripe | Stripe-Signature: t=…,v1=… | timestamp.body | Hex HMAC-SHA256 |
| GitHub | X-Hub-Signature-256: sha256=… | Body | Hex HMAC-SHA256 |
| Razorpay | X-Razorpay-Signature | Body | Hex HMAC-SHA256 |
| Shopify | X-Shopify-Hmac-Sha256 | Body | Base64 HMAC-SHA256 |
| Slack | X-Slack-Signature: v0=… + X-Slack-Request-Timestamp | v0:timestamp:body | Hex HMAC-SHA256 |
| Standard Webhooks (Svix, Resend, Clerk…) | webhook-signature: v1,… + webhook-id, webhook-timestamp | id.timestamp.body | Base64 HMAC-SHA256, key = Base64 part of whsec_… |
Getting it right
- Sign the raw bytes. Reformatting JSON (spaces, key order, line endings) changes the signature. Frameworks that parse JSON before your handler runs must give you the raw body:
express.raw()in Express,request.body()in FastAPI,request.bodyin Django. - Timestamps prevent replays. Stripe, Slack and Standard Webhooks include the time in the signed string, and handlers should reject events older than about 5 minutes.
- Compare in constant time, with
crypto.timingSafeEqualin Node.js orhmac.compare_digestin Python.
Check a signature you received with the Webhook Signature Verifier.
FAQ
How is a Stripe webhook signature computed?
HMAC-SHA256 of “timestamp.payload” with your endpoint’s signing secret, hex-encoded, sent as Stripe-Signature: t=timestamp,v1=signature.
How does GitHub sign webhooks?
HMAC-SHA256 of the raw body with your webhook secret, sent as X-Hub-Signature-256: sha256= followed by the hex digest.
Why does my server reject the signature?
Usually the body changed between signing and verifying: parsed and re-serialised JSON, different whitespace, or a trailing newline. Verify against the raw request body.
What is Standard Webhooks?
An open specification used by Svix, Resend, Clerk and others: HMAC-SHA256 over “id.timestamp.body”, sent in webhook-id, webhook-timestamp and webhook-signature headers.