---
title: "Verify GitHub Webhook Signatures — Free Online Tool | WebhookRelay"
meta:
  "og:description": "Free online GitHub webhook signature verifier. Validate the X-Hub-Signature-256 header against your webhook secret. Paste the payload, secret and signature to check it instantly — runs in your browser, no signup."
  "og:title": "Verify GitHub Webhook Signatures — Free Online Tool"
  description: "Free online GitHub webhook signature verifier. Validate the X-Hub-Signature-256 header against your webhook secret. Paste the payload, secret and signature to check it instantly — runs in your browser, no signup."
---

# **Verify GitHub Webhook Signatures**

GitHub signs webhook deliveries with HMAC-SHA256 over the raw request body and sends the result in the `X-Hub-Signature-256` header (formatted `sha256=…`). Paste the raw body, the secret you configured on the webhook, and the header value.

**Raw request body (payload)**

**Webhook secret**

**Computed signature**

**Signature to verify **(X-Hub-Signature-256)

**Paste the X-Hub-Signature-256 value above to compare**

Everything runs in your browser — the payload and secret never leave this page. Want to verify a different provider? See the [webhook signature verifier hub](https://webhookrelay.com/verify-github-webhook-signature/verify-webhook-signature/) or the generic [HMAC generator](https://webhookrelay.com/verify-github-webhook-signature/hmac-verification/).

## **How GitHub signs webhooks**

1. Take the **raw** request body exactly as delivered.
2. Compute HMAC-SHA256 using your webhook secret as the key, hex-encoded.
3. Prefix it with `sha256=` and compare to `X-Hub-Signature-256` with a constant-time check.

**References & official docs:**

- [GitHub — Validating webhook deliveries](https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries)
- [GitHub — Securing your webhooks](https://docs.github.com/en/webhooks/using-webhooks/securing-your-webhooks)

## **Verify GitHub signatures in code**

**Node.js**

```
const crypto = require('crypto');

const expected = 'sha256=' + crypto
  .createHmac('sha256', process.env.WEBHOOK_SECRET)
  .update(rawBody)            // raw bytes of the request body
  .digest('hex');

const received = req.headers['x-hub-signature-256'];
const valid = crypto.timingSafeEqual(
  Buffer.from(expected), Buffer.from(received));
```

**Python**

```
import hmac, hashlib

expected = 'sha256=' + hmac.new(
    secret.encode(), raw_body, hashlib.sha256).hexdigest()

received = request.headers['X-Hub-Signature-256']
valid = hmac.compare_digest(expected, received)
```

## **Frequently asked questions**

<details>

<summary>**X-Hub-Signature vs X-Hub-Signature-256?**</summary>



GitHub sends both. `X-Hub-Signature` is the legacy SHA-1 version; always verify `X-Hub-Signature-256` (SHA-256) instead.

</details>

<details>

<summary>**Where do I set the secret?**</summary>



In the repository or organization webhook settings, in the "Secret" field. GitHub then signs every delivery with it; an empty secret means no signature is sent.

</details>

## **Verify other providers**

[![Stripe logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/stripe.svg)Stripe](https://webhookrelay.com/verify-github-webhook-signature/verify-stripe-webhook-signature/) [![Shopify logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/shopify.svg) Shopify](https://webhookrelay.com/verify-github-webhook-signature/verify-shopify-webhook-signature/) [![Slack logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/slack.svg) Slack](https://webhookrelay.com/verify-github-webhook-signature/verify-slack-webhook-signature/) [![Twilio logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/twilio.svg) Twilio](https://webhookrelay.com/verify-github-webhook-signature/verify-twilio-webhook-signature/) [**S** Standard Webhooks](https://webhookrelay.com/verify-github-webhook-signature/verify-standard-webhooks-signature/) [![Square logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/square.svg) Square](https://webhookrelay.com/verify-github-webhook-signature/verify-square-webhook-signature/) [**L** LINE](https://webhookrelay.com/verify-github-webhook-signature/verify-line-webhook-signature/) [**A** Airwallex](https://webhookrelay.com/verify-github-webhook-signature/verify-airwallex-webhook-signature/) [**M** MyFatoorah](https://webhookrelay.com/verify-github-webhook-signature/verify-myfatoorah-webhook-signature/) [![Zendesk logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/zendesk.svg) Zendesk](https://webhookrelay.com/verify-github-webhook-signature/verify-zendesk-webhook-signature/) [![DocuSign logo](https://webhookrelay.com/verify-github-webhook-signature/images/landing/logos/docusign.svg) DocuSign](https://webhookrelay.com/verify-github-webhook-signature/verify-docusign-webhook-signature/) [**K** Klarna](https://webhookrelay.com/verify-github-webhook-signature/verify-klarna-webhook-signature/) [**A** Attio](https://webhookrelay.com/verify-github-webhook-signature/verify-attio-webhook-signature/)

[HMAC Generator](https://webhookrelay.com/verify-github-webhook-signature/hmac-verification/) [CloudEvents Validator](https://webhookrelay.com/verify-github-webhook-signature/cloudevents-validator/) [Webhook Tester (Bin)](https://webhookrelay.com/verify-github-webhook-signature/webhook-bin/)

Receiving GitHub webhooks on a server behind a firewall or on localhost? Webhook Relay can [forward them to your internal service](https://webhookrelay.com/verify-github-webhook-signature/webhooks/) and even [verify or transform them](https://webhookrelay.com/verify-github-webhook-signature/features/transform-webhooks/) before delivery.