API security

Verify webhook signatures locally

Stripe, GitHub, and Slack all sign webhook payloads with HMAC-SHA256. You can test verification in your browser, so your signing secret stays on your device.

Open HMAC Signer JSON & API workflow
Stripe GitHub Slack

When a signature check fails, it is tempting to paste the signing secret into the first “online HMAC” site you find. This guide explains how each provider builds its signature, then shows how to reproduce the header privately with the Webhook HMAC Signer. The most common cause of a mismatch is verifying a parsed and re-serialized body instead of the exact raw bytes the provider sent. Our blog post on verifying webhook signatures locally covers more debugging cases.

Providers

How each platform signs

Stripe

Header Stripe-Signature with timestamp t and HMAC-SHA256 v1 over {timestamp}.{raw_body}.

  1. Read the raw body before JSON parse.
  2. Extract t and v1.
  3. HMAC with whsec_....
  4. Constant-time compare.
  5. Reject stale timestamps (replay window).

Stripe docs

GitHub

Header X-Hub-Signature-256 as sha256= plus hex HMAC-SHA256 of the raw body.

  1. Keep the exact delivery body.
  2. HMAC-SHA256 with the webhook secret.
  3. Constant-time compare of the hex digest with the header value.

GitHub docs

Slack

Header X-Slack-Signature from base string v0:{timestamp}:{raw_body}, HMAC-SHA256, prefixed v0=.

  1. Also check X-Slack-Request-Timestamp.
  2. Reject old requests (replay protection).
  3. Constant-time compare of signatures.

Slack docs

Local test

Reproduce the header in-browser

1

Open the signer

Launch the Webhook HMAC Signer.

2

Pick a preset

Choose Stripe, GitHub, or Slack so the tool builds that provider’s signed string.

3

Paste secret + body

Everything stays in the tab. Use a test-mode secret rather than a production one whenever you can.

4

Generate or verify

Build the expected header, or check an incoming header against the payload.

Need a sample payload to sign? Generate one with the Webhook Payload Simulator. To see why a retried delivery behaves differently, compare two deliveries in the Webhook Replay Diff Lab. If you need a record of the check, download a privacy receipt after the job.

Keep signing secrets out of unknown HMAC sites

Signatures are computed with Web Crypto in your browser, with presets for Stripe, GitHub, and Slack and an optional privacy receipt.

Open Webhook HMAC Signer