DevTools Logo

HMAC Generator

HMAC Generator

Generate HMAC signatures with the Web Crypto API — nothing is sent to a server

Input

Message and secret key

About this tool

HMAC Generator runs entirely in your browser on DevTools — no signup, no upload.

What this tool does not do

  • HMAC Generator is a free in-browser utility, not a hosted API, and keeps no server-side history.

How to use this tool

  1. Using HMAC Generator

    Open HMAC Generator, enter or paste your input, and copy the result.

Frequently asked questions

What is HMAC used for?

It produces a fixed-size signature that proves a message has not been tampered with AND comes from someone who holds the secret key. Common uses are API request signing (Stripe, GitHub, AWS), webhook payload verification, signed cookies, and CSRF tokens — anywhere the receiver needs to confirm the sender's identity and message integrity in one step.

Which algorithm should I pick?

HMAC-SHA256 is the safe default and what most modern APIs use. HMAC-SHA1 exists for legacy compatibility with older webhooks but should not be used in new designs; HMAC-SHA384 and HMAC-SHA512 are stronger and only required when the receiving system specifies them.

Hex or Base64 — does it matter?

Both encode the same bytes; pick whichever the receiving API expects. Hex is case-insensitive and easy to compare visually, while Base64 is shorter (~25% fewer chars) and common in HTTP headers. An HMAC decoded from hex and re-encoded as Base64 will still verify, because the underlying bytes are identical.

Does my secret key leave the browser?

No. The HMAC is computed using the Web Crypto API entirely in your browser; the key, the message, and the resulting signature are never sent to a server.