Developer tools · webhooks · JWT · HMAC
Check the signature before you trust the payload
A webhook verifier and JWT inspector for people who debug integrations in production. Paste the secret, the exact raw body and the header: SigForge recomputes the HMAC in this tab with Web Crypto and answers VALID or MISMATCH in milliseconds. No backend, no upload, no account.
- Web Crypto only
- Nothing uploaded
- No account
- Works offline after load
- Free
In short
SigForge is a free browser tool that verifies webhook signatures from Stripe, GitHub, Slack, Shopify and Discord, and decodes or verifies HS256, HS384 and HS512 JSON Web Tokens. Every calculation runs in the tab with the browser's own Web Crypto API, so the secret, the payload and the token never leave the device, nothing is written to storage, and the page keeps working offline after the first load.
Verify a webhook signature
Web Crypto · this tabInspect and verify a JWT
HS256 · HS384 · HS512Header
{}Payload
{}Time claims
Export and replay
Built from the last verification in the Webhook tab. The secret is never written into the code: read it from an environment variable.
# Run a verification in the Webhook tab first.
# Run a verification in the Webhook tab first.
// Run a verification in the Webhook tab first.
Three steps
01 / 03- 01
Pick the provider
The preset decides the signed string, the hash and the encoding, including Stripe's t.body and Slack's v0:timestamp:body.
- 02
Paste the real bytes
Secret, timestamp, header value and the raw body. Loading the sample fills all four with a working vector.
- 03
Read the verdict
VALID or MISMATCH, the expected digest, and the timestamp drift against the provider's tolerance. Then export curl, Python or Node code.
Guide
webhooks / JWTWhat a webhook signature actually proves
A webhook is an unauthenticated HTTP request. Anyone who learns the URL can post a body to it, so the provider adds a header computed with a secret shared only with you. That header is the whole of the authentication: if it verifies, the bytes you received were produced by someone who holds the secret, and they were not altered in transit.
For HMAC schemes the construction is a keyed hash. The provider hashes the secret together with a canonical string and sends the digest. Your endpoint rebuilds the same string from the request it received, hashes it with the same secret, and compares. HMAC does not encrypt anything: the body is still readable, and the signature says nothing about who is allowed to read it. What it gives you is integrity and origin, which is exactly what a payment, a push or a deploy event needs.
Two details matter more than the algorithm. First, the comparison must be constant time, because a comparison that returns early leaks how many leading characters were correct and makes the digest guessable byte by byte. SigForge compares every character of both strings before it answers, and the exported snippets use hmac.compare_digest and crypto.timingSafeEqual. Second, the secret must be the exact byte string the provider issued. A trailing newline copied from a .env file is the single most common cause of a mismatch that looks impossible.
The signed string is different for every provider
There is no general webhook signature standard. Each provider invented its own header, its own string to sign and its own encoding, and the differences are where bugs live. This is what SigForge implements, and what each preset expects.
| Provider | Header | String that is signed | Encoding |
|---|---|---|---|
| Stripe | Stripe-Signature: t=...,v1=... | timestamp + "." + raw body | hex, several v1 values during rotation |
| GitHub | X-Hub-Signature-256: sha256=... | the raw body only | hex |
| Slack | X-Slack-Signature: v0=... | v0:timestamp:raw body | hex, timestamp in a separate header |
| Shopify | X-Shopify-Hmac-Sha256 | the raw body only | base64, not hex |
| Discord | X-Signature-Ed25519 | timestamp + raw body | hex Ed25519 signature checked with the app public key |
| Generic | any header you name | the body, optionally timestamp + "." + body | hex or base64, SHA-256, SHA-384 or SHA-512 |
Stripe sends one t value and one or more v1 values. More than one appears while you rotate the endpoint secret: the old secret and the new one are both accepted for a short period, so a correct implementation accepts the request if any v1 matches. Slack puts the timestamp in X-Slack-Request-Timestamp rather than inside the signature header, and the base string starts with the literal v0:. Shopify is the usual trap because the digest is base64: comparing it to a hex string looks like a broken secret. GitHub and Shopify do not sign a timestamp at all, so a replay has to be caught by remembering delivery IDs rather than by a clock.
Raw bytes, not a parsed object
Every mismatch that is not a wrong secret is a body that changed. Hashing a JavaScript object, a Python dictionary or a re-encoded JSON string produces a different byte sequence than the one the provider signed, even when the printed JSON looks identical. Key order, whitespace, escaped slashes and unicode escapes all change bytes.
Read the raw body before any parser touches it. In Express that means express.raw({ type: 'application/json' }) mounted on the webhook route before express.json(). In Next.js App Router it means await request.text() and never await request.json() first. On API Gateway the body can arrive base64 encoded, so decode it before hashing. A proxy that recompresses or rewrites the body, and a test client that pretty prints it, break the signature in the same way.
Form encoded providers such as Slack sign the URL encoded string exactly as sent, including the percent escapes and the field order. The raw body is therefore whatever arrived, not a dictionary you rebuilt.
Timestamp windows, replay and clock skew
A valid signature is valid forever, which is why providers that care about replay add a timestamp. Stripe allows 300 seconds of drift by default, Slack five minutes, and both expect you to reject anything older. SigForge shows the drift it measured, inside or outside the tolerance, next to the signature verdict, so a request that verifies but is two hours old is visible instead of silently accepted.
Discord signs the timestamp together with the body, so changing it breaks the signature, but it still leaves the window check to you. GitHub and Shopify have no timestamp in the signature at all: deduplicate with X-GitHub-Delivery or the Shopify event ID. Clock skew on a container that sleeps is a real source of false rejections, which is why every serious receiver allows a small window rather than an exact match.
JWT: decoding is not verification
A JSON Web Token has three base64url segments: header, payload, signature. Both of the first two are plain text to anyone who has the token, so decoding one tells you what the issuer claims and nothing about whether the claim is true. People paste tokens into online decoders every day and forget that the payload of an expired token still looks perfectly valid.
SigForge decodes the header and payload, formats the JSON, and turns exp, iat and nbf into local times with a plain language verdict: expired four hours ago, expires in twenty minutes, not valid for another day. With the shared secret it then recomputes the HS256, HS384 or HS512 signature over header.payload and compares it in constant time.
Two rules survive every framework. First, if the header says alg: none, the token carries no signature and must be rejected; the algorithm is attacker controlled text, not a trusted instruction. Second, an HS token is only as strong as its secret: a short human readable secret is guessable offline, which is why the exported code reads the secret from an environment variable and why asymmetric algorithms such as RS256 and ES256 are the right choice for anything public facing. SigForge tells you when a token uses an algorithm it cannot verify offline instead of pretending the signature passed.
A checklist that catches most failures
- Body re-serialized. Hash the received bytes, not a parsed object. This is the most common failure by a wide margin.
- Secret has a newline or quotes. Print its length, not its value, when you debug. A 33 character secret means a stray newline.
- Wrong header variant. GitHub sends
X-Hub-Signature-256next to a legacy SHA-1 header, and Stripe'sv1is notv0. - Base64 versus hex. Shopify is base64. Comparing it to hex fails even when the secret is right.
- Case folding. Lowercase both sides before comparing hex, or the comparison fails on an uppercase digest.
- Rotation. Accept any matching
v1during secret rotation, not just the first one. - Timestamp units. Seconds, not milliseconds, and the value that was signed, not the time you received the request.
- Compression. A middleware that gunzips and re-serializes has already destroyed the bytes.
Why this page has no backend
Secrets are the most sensitive string in an integration. Sending one to a stranger's server to check a signature is a bad trade, so SigForge does the opposite: the page is a single static bundle, the hashing is the browser's own crypto.subtle, and no network request carries the secret, the body or the token. There is no account, no cookie, no localStorage write and no analytics script. Reloading the page erases everything you pasted, which is also the reason the tool works on a plane or on an air gapped machine after the first load.
That constraint shapes the code export as well. The snippets print values only for the public parts, read the secret from WEBHOOK_SECRET, and compare with a timing safe function, so what you copy into production is the safe pattern rather than a debugging shortcut.