opyebWebhookLab

GitHub · push / pull_request

Verify GitHub webhook signatures (X-Hub-Signature-256)

One-line answer

A GitHub webhook signature is the HMAC-SHA256 of the raw request body, hex-encoded and prefixed with sha256= in the X-Hub-Signature-256 header.

Enter the secret and the body you received and this page computes the signature GitHub must have sent. Paste the received header to verify, and use the diagnostics when it does not match.

Sign & verify

e.g. GitHub webhook Secret, Stripe whsec_…, Slack Signing Secret

Generated signature header

X-Hub-Signature-256

Enter a secret and body, then press Generate signature.

Verify a received signature

Original vs re-encoded body

Any proxy or framework that re-serializes JSON breaks the signature. Compare the body you received with the one your server rebuilt.

How to verify

  1. Enter the Secret from GitHub repository → Settings → Webhooks for that hook.
  2. Paste the received body without parsing it first.
  3. Compare the generated sha256=… value with X-Hub-Signature-256, or paste the received header into the verify field.

Verify a signature in your browser right now.

Guides

Frequently asked questions

What is the difference between X-Hub-Signature and X-Hub-Signature-256?

X-Hub-Signature uses SHA-1 and X-Hub-Signature-256 uses SHA-256. GitHub recommends the SHA-256 header; this tool verifies both.

The signature looks right but I still get a 401. Why?

Usually the body was parsed and re-serialized before verification. In Express use express.raw(); in Next.js use request.text() so the raw bytes survive.

What happens if I rotate the secret?

Every signature made with the old secret becomes invalid. GitHub starts signing with the new one, so allow both secrets briefly during a deployment to avoid dropped deliveries.

Does GitHub protect against replay?

The signature carries no time. Use the X-GitHub-Delivery ID to detect duplicates and make processing idempotent.

Verifier by platform

WebhookVerify Stripe webhook signatures (Stripe-Signature)Compute t=,v1= signatures and check the 300 s window.WebhookVerify Slack request signatures (X-Slack-Signature)Compute the v0:timestamp:body signature.WebhookVerify Shopify webhook HMAC (X-Shopify-Hmac-Sha256)Compute and verify the base64 HMAC.WebhookVerify Toss Payments webhook signatures (v1)Compute and verify the body:time signature.