SecureStartKit
SecurityFeaturesPricingDocsBlogChangelog
Sign inBuy Now
Home/Free Tools/Stripe Webhook Signature Verifier

Stripe Webhook Signature Verifier

Paste a Stripe-Signature header, the raw request body, and your whsec_ secret. The tool computes HMAC-SHA256 in your browser, compares it against the v1 signature, checks timestamp tolerance, and decodes the event payload so you can debug failing webhooks without sending the secret over the network.

Last updated: April 28, 2026

The Stripe Webhook Signature Verifier is a free debugging tool that checks whether a Stripe-Signature header matches the HMAC-SHA256 you would compute with your webhook secret. Paste the raw request body, the signature header, and your whsec_ secret. Verification runs in your browser using the Web Crypto API, with no data sent to any server.

Webhook Inputs

Paste the three values Stripe sent and your endpoint expected.

Read from request.headers.get('stripe-signature') in your handler.

Found in Stripe Dashboard under Developers โ†’ Webhooks โ†’ your endpoint โ†’ Signing secret. Never leaves your browser.

Use the exact bytes Stripe sent (await request.text()), not a re-serialized object.

Stripe recommends 300s. Replay attacks succeed when this is set too high.

All verification runs in your browser using the Web Crypto API. Your webhook secret, body, and signature header are never sent over the network.

Why webhook signature verification matters

Stripe webhooks are public HTTP POST requests sent from Stripe's servers to an endpoint on your app. The endpoint URL is discoverable from your account or from a leaked log, which means anyone on the internet can send a forged payload claiming a charge succeeded. Signature verification with your webhook secret proves three things at once: the payload came from Stripe, the body bytes have not been altered in transit, and the request was issued recently (within the timestamp tolerance you allow).

The verification rules are documented by Stripe and identical across SDKs: extract the t= and v1= parts from the Stripe-Signature header, compute HMAC-SHA256(secret, '{t}.{raw_body}'), compare it to v1 in constant time, and reject events whose timestamp is older than 300 seconds. This tool runs the same algorithm in your browser so you can debug a failing verification without rotating secrets or shipping log statements to production.

How does the verification work?

  1. 1. Parse the header. Split the Stripe-Signature value on commas, then extract t= and v1=. Older v0 schemes are not used in production.
  2. 2. Compute HMAC-SHA256. The signed string is the timestamp, a literal dot, and the exact raw body bytes Stripe sent. The browser's Web Crypto API runs the HMAC with your whsec_ secret as the key.
  3. 3. Compare in constant time. The computed signature is compared to v1 byte by byte. Returning false on the first mismatch would leak timing information, so the comparison runs in O(n) regardless of where the difference is.
  4. 4. Check timestamp age. Even with a valid signature, events older than the tolerance (300 seconds by default) are rejected to prevent replay attacks.

Frequently Asked Questions

What does the Stripe webhook signature verifier do?
The Stripe Webhook Signature Verifier checks whether a Stripe-Signature header matches the HMAC-SHA256 you would compute server-side with your webhook secret. Paste the raw request body, the signature header, and your whsec_ secret. The tool runs HMAC verification in your browser, returns pass or fail, and decodes the event JSON so you can see what Stripe sent.
Why is webhook signature verification required?
Stripe webhooks are public HTTP POST requests sent from Stripe to a URL on your app. Anyone who learns that URL can send a forged payload claiming a payment succeeded. Signature verification with your webhook secret proves the request actually came from Stripe and that the body bytes have not been altered. Without it, your endpoint is an unauthenticated mutation surface anyone can call.
What is in the Stripe-Signature header?
The header is a comma-separated list of key-value pairs. The two that matter are t= (the Unix timestamp Stripe signed) and v1= (the HMAC-SHA256 signature in hex). The signed string is {timestamp}.{raw_body}. Stripe documents older v0 schemes you should ignore. Always verify against v1 and use the exact raw bytes Stripe sent, not a re-serialized version of the JSON.
Why does my real webhook signature fail to verify even when the secret is right?
The most common cause is that your framework parsed the request body before you computed the signature. JSON.parse plus JSON.stringify produces a different byte string than what Stripe signed (different whitespace, key order, escaping). You must verify against the exact raw bytes. In Next.js Route Handlers, read await request.text() once and use the same string for both verification and parsing.
Is my webhook secret sent anywhere?
No. The verification runs entirely in your browser using the Web Crypto API. Your webhook secret, payload, and signature header never leave your machine. There is no backend, no logging, and no analytics on the inputs. You can paste a production secret to debug a failing webhook without rotating it afterward.
What is the timestamp tolerance and why does it matter?
Stripe recommends rejecting webhooks whose t= timestamp is more than 300 seconds (5 minutes) old. This blocks replay attacks where someone captures a valid webhook and replays it later. The verifier shows the timestamp age so you can see if a verification failure is a tolerance issue or a true signature mismatch. Stripe SDKs default to 300 seconds; raise it only with a clear reason.

More Free Tools

๐Ÿ’ณ

Stripe Fee Calculator

Calculate Stripe fees for any payment method and currency.

๐Ÿ›ก๏ธ

RLS Policy Generator

Generate Supabase Row Level Security policies with templates.

๐Ÿ’ฐ

SaaS Pricing Calculator

Find your break-even price and suggested pricing tiers.

๐Ÿ–ผ๏ธ

OG Image Preview

Preview meta tags on Google, Twitter, LinkedIn, and more.

๐Ÿ”’

Security Checklist

30 essential security checks with scoring and progress tracking.

โ˜๏ธ

Tech Stack Costs

Compare hosting, database, and service costs at scale.

๐Ÿ”

Security Headers

Generate Next.js security headers config with copy-paste code.

๐Ÿ”‘

JWT Decoder

Decode and inspect JSON Web Tokens. View claims and expiry status.

โœ๏ธ

JWT Generator

Build and sign JWTs with HS256, HS384, or HS512 in your browser.

๐ŸŒ

CORS Config Generator

Generate CORS configuration for Next.js or Express with copy-paste code.

๐Ÿงช

JSON to Zod Converter

Paste JSON and get a typed Zod schema with format detection.

๐Ÿช

Stripe Webhook Verifier

Verify Stripe-Signature headers with your webhook secret in your browser.

๐Ÿ—๏ธ

API Key Generator

Generate cryptographically secure API keys, webhook secrets, and tokens in your browser.

Building a SaaS?

Skip months of boilerplate. SecureStartKit gives you auth, payments, email, and security best practices out of the box.

Get SecureStartKit