Webhook signature debugger

Find out why a Stripe, GitHub, Shopify, Slack or Standard Webhooks signature fails: paste the secret, header and raw body. Runs in your browser.

Free. Runs entirely in your browser: nothing you paste is sent to a server. By David Garcia Berenguer · Updated 2026-11-29

What it checks

The tool recomputes the HMAC the provider sends and compares it with the header. When they differ, it retries with the changes that usually cause the mismatch and tells you which one makes it pass:

  • The body was re-serialised: parsed as JSON and turned back into a string, compact or pretty-printed.
  • A trailing newline was added or removed, or line endings changed between LF and CRLF.
  • The secret has surrounding whitespace, is missing (or has an extra) whsec_ prefix, or a Standard Webhooks secret was used as text instead of base64-decoded.
  • The timestamp is outside the 5-minute window libraries accept, or is in milliseconds.

If none of those explain it, the secret is wrong for that endpoint.

How each provider signs

Provider Header Signed message Key Encoding
Stripe Stripe-Signature: t=…,v1=… <t>.<raw body> the whsec_… secret as text hex
GitHub X-Hub-Signature-256: sha256=… raw body webhook secret hex
Shopify X-Shopify-Hmac-Sha256 raw body app client secret base64
Slack X-Slack-Signature: v0=… v0:<X-Slack-Request-Timestamp>:<raw body> signing secret hex
Standard Webhooks webhook-signature: v1,… <webhook-id>.<webhook-timestamp>.<raw body> base64-decoded part after whsec_ base64

All of them use HMAC-SHA256, and all of them sign the raw bytes of the body.

Fixing it in code: verify the raw body

Read the body as text before anything parses it, verify, then parse:

// app/api/webhooks/github/route.ts (Next.js App Router)
import { createHmac, timingSafeEqual } from "node:crypto";

export async function POST(request: Request) {
  const raw = await request.text(); // the exact bytes; never JSON.stringify(await request.json())
  const header = request.headers.get("x-hub-signature-256") ?? "";
  const expected = "sha256=" + createHmac("sha256", process.env.GITHUB_WEBHOOK_SECRET!).update(raw).digest("hex");
  const a = Buffer.from(header), b = Buffer.from(expected); // timingSafeEqual throws on different lengths
  if (a.length !== b.length || !timingSafeEqual(a, b)) return new Response("invalid signature", { status: 401 });
  const event = JSON.parse(raw);
  // ...store it, answer 2xx, then process
  return new Response(null, { status: 204 });
}

In Express, mount express.raw({ type: "application/json" }) on the webhook route instead of express.json(), and verify req.body (a Buffer).

A valid signature is only the first step: the same event can still arrive twice, out of order, or while your database is down. Reliable Webhooks verifies Stripe, GitHub and any HMAC-signed provider, then deduplicates, stores and retries events.

Frequently asked questions

Is it safe to paste my webhook secret here?

The check runs in your browser with the Web Crypto API and makes no network requests, so the secret, header and body never leave the page. Still, prefer a test-mode secret, and rotate any live secret you have pasted somewhere you don't control.

Why does verification fail when my secret is correct?

Almost always because the body you verify is not the exact bytes the provider sent: a framework parsed the JSON and you re-serialised it, or a newline or line ending changed. HMAC signatures cover every byte, so verify the raw body before parsing it. This tool tries those changes and tells you which one matches.

What does each provider sign?

Stripe: HMAC-SHA256 of "<t>.<body>" with the whsec_ secret as-is, hex in v1=. GitHub: HMAC-SHA256 of the body, hex after sha256=. Shopify: HMAC-SHA256 of the body, base64. Slack: HMAC-SHA256 of "v0:<timestamp>:<body>", hex after v0=. Standard Webhooks: HMAC-SHA256 of "<id>.<timestamp>.<body>" with the base64-decoded part of whsec_, base64 after v1,.

Why does a valid signature still fail in my code?

Timestamp tolerance. Stripe, Slack and Standard Webhooks libraries reject deliveries whose timestamp is more than about 5 minutes away from your clock, to stop replays. The tool warns when the timestamp you pasted is outside that window.

Related guides

See Reliable Webhooks