HMAC Calculator

Calculate HMAC values for text, local files, or URLs using SHA-256, SHA-512, SHA-1, MD5, and other hash algorithms in your browser. Read more

HMAC calculator online

HMAC (Hash-based Message Authentication Code) combines a cryptographic hash with a secret key. Use this page when you need an HMAC generator or HMAC calculator for text, a local file, or a URL, including common searches such as HMAC SHA256 online, HMAC SHA512, HMAC SHA1, and HMAC MD5.

This page focuses on widely used HMAC algorithms: SHA-256, SHA-512, SHA-384, SHA-224, SHA-1, and MD5. Other hash functions can also be used with HMAC in theory, but RIPEMD, MD2, MD4, and similar legacy algorithms are uncommon for general HMAC workflows. Use those algorithm-specific hash pages when you need legacy compatibility.

A plain hash verifies that bytes match an expected digest. HMAC adds a secret key, so someone without the key cannot produce the same value for a changed message. HMAC authenticates integrity with a shared secret; it does not encrypt data and cannot hide the message contents.

Calculation stays in your browser. Local files and secret keys are not uploaded to this site.

How to calculate HMAC-SHA-256

  1. Keep Source set to Text, or switch to File / URL when calculating the HMAC for raw bytes.
  2. Enter the message. For Text source, choose the input encoding that matches those bytes (UTF-8 by default).
  3. Select Algorithm HMAC-SHA-256 (the default).
  4. Enter the secret key and its key encoding (UTF-8, Hex, or Base64).
  5. Choose Hex or Base64 for the MAC output.
  6. Calculate and compare the full result with the expected HMAC.

Reproducible example

  • Algorithm: HMAC-SHA-256
  • Message: The quick brown fox jumps over the lazy dog
  • Key: key (UTF-8)
  • Output: Hex

Expected HMAC-SHA-256:

f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8

Hash versus HMAC

Use a plain hash page when you only need a digest for integrity or content addressing. Use HMAC when a shared secret should bind the digest to an authenticating party.

This calculator is not a password-storage KDF. For password hashing or key derivation, prefer Bcrypt, PBKDF2, or HKDF when those fit the protocol.

  • SHA-256 text hash, including optional HMAC on that page
  • SHA-256 File Checksum for file digests
  • MD5 (legacy; prefer SHA-256 or stronger algorithms for new work)

Choose a strong, secret key for real authentication. Empty keys are technically valid for testing, but they are not suitable for production secrets. Do not put production keys into share URLs.

Input
Output
Share Link
Settings
Key