🔐 encrypt.tools
HMAC · SHA-2

HMAC Generator (SHA-256 / SHA-512)

Keyed message authentication codes.

Free · no sign-up · runs locally·

loading tool…
FIELD NOTES

About this tool

An HMAC binds a message to a secret key: anyone with the key can verify both integrity and authenticity. It is the signature scheme behind webhook verification (Stripe, GitHub), AWS request signing, and HS256 JWTs.

Enter your key as text or hex, choose a hash, and the MAC updates live. Computation uses the Web Crypto API locally.

Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.

COMMAND LINE

Do the same in a terminal

Reproduce or cross-check this tool with standard command-line utilities. For deterministic operations like hashing and encoding, the output matches exactly.

$ printf 'hello' | openssl dgst -sha256 -hmac 'secret'
SHA2-256(stdin)= 88aab3ede8d3adf94d26ab90d3bafd4a2083070c3bcce9c014ee04a443847c0b
FREQUENTLY ASKED

Frequently asked questions about HMAC Generator

What is HMAC used for?+

HMAC proves a message came from someone holding a shared secret key and wasn't altered. It backs webhook signatures (Stripe, GitHub), AWS request signing, and HS256 JWTs.

How is HMAC different from a plain hash?+

A plain hash anyone can compute. HMAC mixes in a secret key, so only parties who know the key can produce or verify the code — giving authenticity, not just integrity.

Can I use a hex key?+

Yes — choose the hex key format to supply binary key material, or use text for a passphrase-style secret.

LEARN MORE
RELATED INSTRUMENTS