toolqik

49 · API & Webhooks

Webhook Signature Generator

Sign webhook payloads exactly like Stripe, GitHub, Shopify, Slack and others.

Runs in your browser
Provider
Signature headers

  
curl command

  
Exact string that was signed

  

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

ProviderHeaderWhat is signedEncoding
StripeStripe-Signature: t=…,v1=…timestamp.bodyHex HMAC-SHA256
GitHubX-Hub-Signature-256: sha256=…BodyHex HMAC-SHA256
RazorpayX-Razorpay-SignatureBodyHex HMAC-SHA256
ShopifyX-Shopify-Hmac-Sha256BodyBase64 HMAC-SHA256
SlackX-Slack-Signature: v0=… + X-Slack-Request-Timestampv0:timestamp:bodyHex HMAC-SHA256
Standard Webhooks (Svix, Resend, Clerk…)webhook-signature: v1,… + webhook-id, webhook-timestampid.timestamp.bodyBase64 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.body in 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.timingSafeEqual in Node.js or hmac.compare_digest in 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.

esc
↑↓ navigate↵ open