Crypto & Hashing

HMAC Generator

Compute a keyed HMAC over text or a file with any supported digest.

  • Nothing savedInput and output stay in memory and are gone when you leave this page.
  • Runs in your browserProcessing happens in this page. No application server receives your input.
Current 256 bits: The default choice. Widest support of anything here.
More options

Secret key

Nothing on this page is saved. Closing or reloading the tab discards it permanently.

Message text

HMAC

What this tool does

Computes an RFC 2104 keyed Hash-based Message Authentication Code (HMAC) over UTF-8 text or a streamed file up to 8 GB inside hash.worker.ts. Keys may be entered as UTF-8 text, hexadecimal, or Base64, and the resulting MAC can be displayed and copied as lowercase hex or standard Base64. Nothing on this page is saved. Closing or reloading the tab discards it permanently.

Why checksums are disabled

Non-cryptographic checksums (xxHash64, xxHash3, CRC-32, CRC-32C, and Adler-32) do not define an internal compression block size and are not collision-resistant, so RFC 2104 HMAC is undefined over them. Those options are disabled in the algorithm selector with their status explanation, and any direct programmatic call throws HMAC is not defined for <label>. Choose a cryptographic hash.

Constant-time verification and threat model

Comparing a MAC you computed against one you received should be done in constant time on a server, and this page does not demonstrate that, because in a browser tab with no network there is nobody to leak the timing to.

Limits

Files up to 8 GB. Generates a MAC; it does not verify one against a server, because there is no server. No CMAC, no KMAC, no Poly1305: HMAC only.

Error and status messages

  • HMAC is not defined for <label>. Choose a cryptographic hash.
  • Invalid hex character <char> at line <n>, column <n>
  • The key is not valid base64.
  • The file could not be read to the end. It may have been moved or changed while it was being hashed.
  • The hashing engine could not be loaded. Reload the page to try again.
  • The hashing engine needs WebAssembly, which is unavailable in this browser.
  • Hashing was cancelled.

Related tools

  • Hash Generator (/crypto/hash) for unkeyed digests and checksums across all 24 algorithms.
  • Password Hash (/crypto/password-hash) for slow, salted password hashing with Argon2id, bcrypt, and scrypt.
  • PBKDF2 Key Derivation (/crypto/pbkdf2) for RFC 8018 key derivation built on iterated HMAC.
  • TOTP / 2FA Code (/security/totp) for RFC 6238 time-based one-time codes built on HMAC-SHA1/256/512.

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.