Security & QR · HMAC

Webhook HMAC-SHA256 & HMAC-SHA512 Signature Tester

Reproduce and debug cryptographic webhook signatures for Stripe, GitHub, Shopify, and custom APIs—outputting both lowercase Hex and Base64 digests locally.

✓ 100% Browser-Local · Zero Upload Reviewed: 2026-11-26

Initializing local browser workspace...

Debug Failing Webhook Signature Checks in Seconds

Webhook signature mismatches are one of the most frustrating integration bugs when connecting Stripe, Shopify, Paddle, or GitHub to your backend. Testing the exact raw body and secret locally lets you verify your HMAC computation before debugging server middleware.

  • Computes HMAC-SHA256 and HMAC-SHA512 via native WebCrypto SubtleCrypto
  • Outputs both Hex (Stripe/GitHub format) and Base64 (Shopify format) simultaneously
  • Instant recalculation on payload or secret edit for rapid webhook debugging
  • Exact raw-string UTF-8 byte signing without altering whitespace
  • Zero server transmission so real webhook signing secrets stay private

Step-by-Step Guide

  1. Choose HMAC-SHA256 (standard across Stripe, GitHub, Shopify) or HMAC-SHA512.
  2. Enter your webhook signing secret (for Stripe, remember to sign `${timestamp}.${rawBody}`).
  3. Paste the exact unmodified raw request body into the Payload editor.
  4. Compare the Hex or Base64 output against the incoming X-Hub-Signature-256, Stripe-Signature, or X-Shopify-Hmac-Sha256 header.

Three Reasons Webhook Signature Verification Fails

Re-Stringifying Parsed JSON Instead of Signing Raw Bytes

Express/Fastify JSON middleware parses and re-serializes whitespace or key order, changing a single byte and invalidating the HMAC. Always capture the raw unmodified request buffer.

Using == Instead of Constant-Time Comparison

Comparing HMAC strings with standard equality leaks timing information. Always use crypto.timingSafeEqual() in production webhook handlers.

Forgetting Stripe's Timestamp Prefix

Stripe computes HMAC-SHA256 over the concatenated string t + '.' + rawBody (where t is extracted from the Stripe-Signature header), not over rawBody alone.

Common API & Payment Integration Workflows

  • Verifying Stripe invoice.paid and checkout.session.completed webhook handler implementations.
  • Testing Shopify X-Shopify-Hmac-Sha256 Base64 signatures for fulfillment automation.
  • Validating GitHub Actions and Feishu/Slack outgoing event webhook signatures.

Frequently Asked Questions

Why do Stripe and GitHub use Hex while Shopify uses Base64?

Both represent the exact same 32-byte SHA-256 HMAC binary digest—Hex renders it as 64 hexadecimal characters whereas Base64 renders it as 44 ASCII characters.

Does trailing whitespace or a newline in the payload change the HMAC?

Yes! Even a single space or trailing newline changes the entire cryptographic digest completely.

Is my webhook secret safe when pasted into this tester?

Yes—signing executes solely in browser WebCrypto memory with zero backend requests.

Local Privacy Guarantee: Webhook secrets and raw payloads are signed locally in your browser's WebCrypto engine and never transmitted.