opyeb hmaclab

No upload, no server

Compute the webhook signature,
judge forgery byte by byte

Paste a secret and a payload to compute HMAC-SHA256, SHA-384 or SHA-512 inside your browser. Verify the exact GitHub, Slack and Stripe header formats, and see which byte the constant-time comparison rejected. Keys and bodies never leave the page.

Enter a secret and payload to compute a signature.

Secret

0 bytes

Use the exact encoding your service stores. The value never leaves this page.

Sample values are synthetic. If you typed a production key, do not share the report.

Payload

0 bytes

Paste the exact bytes the server received. Re-formatting JSON breaks the signature.

Signature

Computed signature

—

Recomputed whenever an input changes.

Platform header

Stripe defaults to 300 s; Slack recommends 300 s (five minutes).

Used only by the generic format.

X-Hub-Signature-256

—
Format details

GitHub sends hexadecimal in X-Hub-Signature-256 with a sha256= prefix. Choosing SHA-1 switches to the legacy X-Hub-Signature (sha1=).

Verification

Choosing a platform fills the expected format. Pasting a header compares it immediately.

Parsed header
—
Bytes compared
—
Bytes matching
—
First difference
—
Timestamp
—

Byte comparison

same different

Constant-time comparison: both byte arrays were XOR-accumulated to the end with no early exit.

The same check in code

Read the secret from an environment variable and compare with a constant-time function.

Report

Summarises the current state. The secret value is not included.

The secret value is not included in the report (encoding and byte length only).

Every computation happens in this browser. The secret you type is never stored.

How to use it

  1. 01Enter secret and body

    Enter the secret in the encoding your service stores (UTF-8, Base64 or Hex), then paste the webhook body exactly. Choose LF or CRLF line endings to match what was actually sent.

  2. 02Compute the signature

    Pick the algorithm and output format. The signature appears immediately, and choosing a platform also builds the GitHub, Slack or Stripe header string.

  3. 03Verify a header

    Paste the header you received. The tool reads its prefix and timestamp, then judges signature equality together with the replay window. Export the result as Markdown or JSON.

What the workbench holds

Why the secret never leaves

A single webhook secret can forge payment events and deployment requests. This tool is built so that no input is sent anywhere.

Frequently asked

Is the secret really not transmitted?

Correct. HMAC computation, header building, constant-time comparison and report generation all run in this page's JavaScript and Web Crypto. No request leaves the browser, and the site's CSP sets connect-src 'none' to block outbound connections outright.

Why is a constant-time comparison necessary?

An ordinary string comparison stops at the first mismatching byte, so response time can reveal how many bytes were correct. Comparing every byte removes that signal. This tool keeps comparing up to the longer length even when the lengths differ.

Why do Slack and Stripe sign a timestamp?

A valid signature replayed later is still an attack. Both services include a timestamp in the signed string and recommend that receivers accept only requests inside a tolerance window. Slack recommends five minutes; Stripe defaults to 300 seconds.

Why keep HMAC-SHA1 at all?

Some older webhook implementations still send a sha1= header. The tool computes it for compatibility, but marks SHA-1 as legacy and recommends SHA-256 or stronger for new integrations.

Does changing line endings change the signature?

Yes. HMAC works on bytes, so LF and CRLF are different inputs. A proxy or framework that re-serialises the body breaks the signature, which is why you must verify the original bytes received.

Does the report contain the secret?

No. The report records only the secret encoding and its byte length, never the value, so a shared export does not expose the key.

Webhook signature guides

All guides

Platform header formats, constant-time comparison and preserving the raw body: the points that break real integrations.

Check a signature now

Load a synthetic sample to fill the secret, body and header at once. You never need a real key.