Skip to the tool
mtool
  • free
  • no sign-up
  • on device
  • generator

HMAC Generator

Generate and verify SHA-1 or SHA-2 HMAC codes from a message and key in your browser — free, with no sign-up, and your message and key never leave your device. Enter the message and key, choose SHA-1 or SHA-2, then copy the code or compare it with an expected HMAC.

Input source

Empty input is valid. Spaces and Unicode are preserved; no BOM is added.

0 bytes

The empty key is valid. Up to 65,536 decoded bytes; the key is never saved or exported.

More settings

Results

Choose Calculate to get a hash of your input.

Compare with expected

Enter an expected value to compare.

Text, files, keys and hashes stay in this tab. Nothing you enter is uploaded or saved.

Questions

How long is the result?

HMAC-SHA256 produces 32 bytes: 64 hexadecimal characters. Base64 represents the same digest bytes. Choose one SHA-1/SHA-2 algorithm and encode the key as UTF-8, Hex, Base64 or Base64url. Empty key and payload are valid. The key is not a salt or a prefix; HMAC alone does not prevent replay.

What input is hashed?

Input source: Text / Files / Encoded bytes. Empty input is valid. Spaces and Unicode are preserved; no BOM is added. Text encoding: UTF-8, UTF-16LE, UTF-16BE; Line endings: LF / CRLF. Any file type is accepted. The original bytes are hashed, not extracted document text or the filename. Files are processed one at a time in 1 MiB chunks.

How does verification work?

Select the expected algorithm and encoding explicitly. Comparison uses decoded bytes and checks the exact length. Changing output format or expected value does not reread a file.

Are my inputs saved or uploaded?

Text, files, keys and hashes stay in this tab. Nothing you enter is uploaded or saved.

Is this tool free?

Yes. This tool is free, with no sign-up and no daily limits.

Do I need an account?

No. You can use this tool without an account.

Related tools

Hash Calculator

Calculate SHA-256 hashes of text, files or decoded bytes locally, then copy or export the result.

Open

MD5 Generator

Calculate MD5 hashes of text, files or decoded bytes locally, then copy or export the result.

  • generator
Open

SHA-1 Generator

Calculate SHA-1 hashes of text, files or decoded bytes locally, then copy or export the result.

  • generator
Open