An HMAC generator on Windows can create full HMAC-SHA-256, HMAC-SHA-384, or HMAC-SHA-512 tags in a browser without sending the key or message to the site server. Use this workflow when a protocol requires a reproducible tag and you know the exact key bytes, message bytes, hash, and output format. The page performs the operation with the browser Web Cryptography API in the current tab.

The decisive detail is byte identity, not how the text happens to look on screen. A Windows application can represent the same visible characters with different bytes, so matching the protocol matters more than matching a label such as “message.”

hmac generator on windows
HMAC Generator on Windows: Exact Tags in Your Browser

What the Windows generator actually produces

HMAC combines a cryptographic hash with a shared secret key. A verifier that possesses the same secret and exact message bytes can calculate the same tag. Agreement can detect modification and authenticate the party that knew the key, but HMAC does not encrypt or conceal the message.

The browser implementation imports the selected bytes as a non-exportable Web Crypto HMAC key, returns the complete authentication tag, and renders it independently as lowercase hexadecimal and standard padded Base64. Those outputs are two representations of identical tag bytes, not two different calculations.

Choose the hash specified by the protocol

The HMAC construction is defined in NIST FIPS 198-1. Select the algorithm named by the governing protocol because SHA-256, SHA-384, and SHA-512 produce different tags for the same key and message.

Hash algorithmFull tag lengthLowercase hex length
SHA-25632 bytes64 characters
SHA-38448 bytes96 characters
SHA-51264 bytes128 characters

The generator always displays the complete tag for the selected hash. Choosing a longer or stronger option does not make it compatible with a verifier configured for another algorithm.

Generate an HMAC tag on Windows

  1. Open the HMAC Generator in a browser on the Windows PC. This is a browser-based workflow rather than a native executable, and the browser must support the Web Cryptography API used by the page.
  2. Select SHA-256, SHA-384, or SHA-512. Check the protocol specification to determine whether it expects the full tag or explicitly defines a truncated form.
  3. Choose UTF-8 or Hex for the secret key, then choose the input mode independently for the message. A UTF-8 key with a hexadecimal message, or the reverse, is valid when those are the protocol's actual byte formats.
  4. Enter the secret key exactly. UTF-8 mode treats the field as text, while hex mode accepts only an even number of hexadecimal digits without a 0x prefix, spaces, colons, or other separators.
  5. Enter the exact message bytes that the verifier will authenticate. If the protocol defines a canonical request string, build that string according to its rules before entering it. Preserve spaces, trailing newlines, and line-ending conventions.
  6. Run the generator to produce the full HMAC tag from the selected key bytes, message bytes, and hash algorithm.
  7. Copy either the complete lowercase hexadecimal value or the complete standard padded Base64 value, depending on the format required by the protocol.
  8. Apply truncation, an algorithm prefix, Base64url conversion, or another transformation only when the specification explicitly requires it. Never shorten a tag by eye or assume visually similar encodings are interchangeable.

Keep Windows inputs byte-exact

Windows software may sign UTF-8, UTF-16, or a legacy code page. Those representations can contain the same visible characters while producing different HMAC tags. This generator accepts UTF-8 text or hexadecimal bytes, so identify the protocol's encoding before entering anything.

Text mode uses UTF-8

UTF-8 mode encodes both text fields as UTF-8. Accented letters, CJK characters, and emoji occupy multiple bytes. A carriage return followed by a line feed is also different from a single line feed, and trailing spaces or a final newline are part of the message when they are present. Copying visible text is therefore not enough when the protocol signs exact file contents or a precisely formatted request.

Hex mode preserves binary values

Hex mode is preferable for published vectors, binary payloads, and values containing zero bytes. It preserves every byte, including 00. The interface rejects odd-length hex and formatting characters so a prefix, space, or colon cannot silently change the value being signed.

Each decoded field is limited to 1,000,000 bytes. Empty keys and messages are also rejected by this interface, even though some low-level standards can define behavior for zero-length data.

Match the required output format

The page supplies the complete tag in lowercase hexadecimal and complete standard padded Base64. Select the representation named by the protocol rather than whichever appears easier to copy.

OutputForm suppliedUse it when
HexadecimalFull lowercase hexThe protocol requests a hexadecimal tag.
Base64Full standard padded Base64The protocol requests standard Base64.

The generator does not emit Base64url, prepend an algorithm identifier, construct a canonical request string, package the message with its tag, or create a binary envelope. If the protocol requires a canonical request string, build it from the exact request components before HMAC generation. A binary envelope also includes the message; neither form can be derived from the complete tag alone. A truncated tag must use the exact defined length and bit convention.

Resolve mismatched Windows results

When two implementations disagree, compare the following items before assuming there is a calculation error:

  • Confirm that both sides use the same hash algorithm.
  • Confirm that the secret keys represent the same bytes.
  • Confirm that the authenticated messages are byte-for-byte identical.
  • Check whether one side used UTF-8 and the other used UTF-16 or a legacy Windows code page.
  • Check for different whitespace, newline, or final-byte conventions.
  • Confirm that one result was not truncated while the other retained the full tag.
  • Confirm that hexadecimal, standard Base64, and Base64url were not confused.

If another Windows program signs UTF-16LE, UTF-16BE, Windows-1252, or another non-UTF-8 format, obtain the exact bytes that it signs and enter those bytes in hex mode. Do not paste text that was silently converted to UTF-8 and assume it represents the original byte sequence.

The generator gives asynchronous jobs an identity token, so changing an input while Web Crypto is working prevents an older result from replacing the newer state. Wait for the calculation that corresponds to your final inputs before copying the tag.

Protect the secret and verify safely

Use independently generated, high-entropy key material appropriate for the protocol. Distribute it through a protected channel, separate keys by purpose, rotate a key after a compromise, and avoid pasting production secrets into an untrusted device.

A human password is not automatically a strong HMAC key. If an application requires password-based authentication, use the exact password-based key derivation scheme and parameters specified by that application, then enter the resulting key bytes. Do not improvise a derivation method because it will not necessarily match the verifier.

On the receiving side, compare complete tags with a constant-time comparison function on the server. Also remember that successful agreement proves shared-key and byte consistency; it does not provide message confidentiality.

Confirm the implementation against published vectors

The implementation checks eight complete tags based on the RFC 4231 test vectors. The cases cover short keys, binary repeated-byte keys and data, keys smaller than the digest, and data crossing hash block boundaries. SHA-256 and SHA-512 are checked across four independent inputs, while the interface also exposes the WebCrypto-defined SHA-384 option.

For published vectors, hex mode is usually the clearest way to preserve every byte. If Windows automation is the actual requirement, compare command-line and browser-based HMAC workflows; this page is specifically the browser-based option.

Related reading: Morse Code Translator on Windows: No Install Needed.