Skip to content
Due to increased demand, text TeamShift to hold the next available slot.(415) 718-2003Call instead
TeamShift

Free tool · runs in your browser

Shopify webhook HMAC verifier: check X-Shopify-Hmac-Sha256

This page verifies a Shopify webhook in your browser: paste the secret, the X-Shopify-Hmac-Sha256 header and the raw body, and it tells you whether Shopify sent it and why a check fails.

Verify a Shopify signature

The verifier opens on a sample Shopify request signed with a demo secret. Replace the secret, headers and body with your own. Everything is computed in your browser; nothing you paste is sent.

The interactive tool needs JavaScript. The same core runs locally: npx @teamshift/webhook-inspect

How Shopify signs a webhook

HeaderX-Shopify-Hmac-Sha256
Signed contentThe raw request body, byte for byte
Algorithm and encodingHMAC-SHA256, base64 (not hex)
SecretFor webhooks an app subscribes to, the app's client secret. For webhooks created in the store admin, the signing key shown on the notifications settings page.
Replay protectionNone in the signature. Deduplicate on X-Shopify-Webhook-Id.

A minimal check in Node.js

import crypto from 'node:crypto';

const sameBytes = (a, b) => a.length === b.length && crypto.timingSafeEqual(a, b);

export function verifyShopify(rawBody, header, secret) {
  if (typeof header !== 'string') return false;
  const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('base64');
  return sameBytes(Buffer.from(header), Buffer.from(expected));
}

Pass the body exactly as it arrived, before any parsing. The tool on this page runs the same check and, when it fails, tries the common fixes to tell you which one applies.

Why Shopify verification fails

  • Hex was compared with base64. Shopify sends base64. A hex digest of the same HMAC never matches.
  • The body was parsed first. Shopify escapes some characters in its JSON; re-serializing changes the bytes.
  • The wrong secret was used. An access token or the API key is not the signing secret, and admin-created webhooks use a different key from app webhooks.

Test your own endpoint

Enter your endpoint URL under "Send a signed test request to your endpoint" and the tool writes a curl command signed the way Shopify signs. Run it in a POSIX shell (macOS, Linux, WSL or Git Bash) to confirm your handler accepts a good signature, then change one character of the body and confirm it is rejected.

Other providers

The main verifier also handles any generic HMAC header.

FAQ

How do I verify a Shopify webhook?

Compute HMAC-SHA256 over the raw request body with your app's client secret, base64-encode the result, and compare it to the X-Shopify-Hmac-Sha256 header with a constant-time comparison.

Why does my Shopify HMAC not match?

Most often the digest was hex-encoded instead of base64, the body was parsed and re-serialized before hashing, or the secret is the wrong one for how the webhook was created.

Is it safe to paste my secret here?

The page sends nothing: the signature is computed in your browser with WebCrypto, and no field is stored or uploaded. Even so, prefer a test secret, and rotate any live secret you have pasted into a tool you do not control.