HohoTools

HMAC Generator

This free HMAC generator produces keyed message authentication codes using the Web Crypto API built into your own browser — no server is involved at any point.

How to use

  1. Enter your secret key in the key field.
  2. Type or paste the message to sign into the editor below.
  3. Choose the digest algorithm (SHA-256 by default) and toggle uppercase output if your target system expects it.
  4. Compare, copy or download the HMAC digest — computed entirely on your device.

Frequently asked questions

What is an HMAC used for?

An HMAC proves both that a message was not altered and that whoever produced it knows the shared secret key. The typical uses are verifying signed API requests and webhooks (many providers sign payloads with HMAC-SHA-256), authenticating tokens, and integrity-checking messages between two parties that share a key.

Is my secret key stored or uploaded?

No. The signature is computed by your browser’s Web Crypto on your device; the key and message are never transmitted and the page keeps no storage — no localStorage, no cookies for content, no logs. Remember the key is still sensitive information while it sits in the page: use test keys where you can and close the tab when finished.

Which digest should I choose?

Whichever algorithm the other side expects — the digest must match exactly. SHA-256 is by far the most common for API and webhook signing; SHA-384 and SHA-512 appear where a specification calls for a longer digest. A different digest produces a completely different signature.

Why does my HMAC not match the expected value?

Almost always an input mismatch: a trailing newline or space in the message, a different key (including a hidden whitespace), a different digest, or a letter-case difference in the hex output. Both the key and the message are UTF-8 encoded here, matching the default of common signing tools.

How is HMAC different from a plain SHA-256 hash?

A plain hash can be computed by anyone from the message alone. An HMAC mixes a secret key into the computation, so only key holders can produce or verify the signature — that is what turns an integrity check into an authenticity check. The key cannot be recovered from the signature.

Related tools

About this tool

This free HMAC generator produces keyed message authentication codes using the Web Crypto API built into your own browser — no server is involved at any point. Enter your secret key and the message, pick a digest (SHA-256, SHA-384 or SHA-512), and the hexadecimal signature appears instantly, recomputed live as you edit. That makes it a practical companion for API signature verification: when a provider signs a webhook or an authenticated request with HMAC and shares a key with you, paste the raw payload and your copy of the key here and compare digests to confirm the request is authentic and untampered. Both the key and the message are encoded as UTF-8 — the convention used by openssl, node:crypto and virtually all signing libraries — so the output matches what your backend computes for the same inputs. Output is lowercase hex by default with an uppercase switch, and the digest can be copied or downloaded as a text file. Everything runs locally: the page has no storage, no logging and no upload of any kind. Treat your key as what it is — a secret: prefer test keys, and close the tab when you are done.