The HMAC Generator accepts large-text messages and keys up to 1,000,000 decoded bytes per field, provided each field is valid UTF-8 or exact hexadecimal bytes.
That limit is measured after decoding, not by the number of visible characters. It applies separately to the secret key and the message, so both fields must fit within the tool’s boundary. For a payload above the limit, use an implementation designed to process the protocol’s complete byte stream rather than shortening the message to make it fit.
The HMAC Generator supports HMAC-SHA-256, HMAC-SHA-384 and HMAC-SHA-512. It performs the operation with the browser Web Cryptography API, does not send the inputs to the site server and keeps key material in the current tab.

What the large-text limit measures
A large-text workflow is measured in bytes because HMAC operates on byte sequences. In UTF-8 mode, the limit applies to the encoded form of the text. Accented letters, CJK characters and emoji can occupy multiple bytes, so a field with fewer visible characters can still be close to the byte ceiling.
Hexadecimal mode is different. Each pair of hexadecimal digits represents one decoded byte, and every byte is preserved, including zero-valued bytes. The limit still refers to the decoded field rather than the number of characters visible in the input box.
| Input mode | Appropriate use | Bytes used by HMAC | Important guardrails |
|---|---|---|---|
| UTF-8 text | A key or message defined by the protocol as literal text | The UTF-8 encoding of every entered character | Preserve spaces, line endings and other whitespace exactly |
| Hexadecimal | Binary data, random key material or published test vectors | One exact byte for each hexadecimal pair | Use an even number of digits; prefixes, spaces, colons and odd nibbles are rejected |
Empty keys and empty messages are rejected by this interface. That behavior is deliberate: some low-level standards define HMAC behavior for zero-length data, but allowing an accidental empty submission would make protocol mistakes harder to spot.
Do not select hexadecimal merely because a message is long. Hex mode is most useful when the protocol defines the payload as bytes or provides a vector in hexadecimal form. For ordinary multilingual text, UTF-8 mode is usually the clearer representation, provided the source contains precisely the characters the verifier receives.
Identify the exact bytes before entering them
Start with the governing protocol, not with the hash algorithm. A usable specification should identify the key bytes, message bytes, HMAC algorithm, any canonicalization rule and the required representation of the resulting tag.
- Key: Determine whether the secret is a literal text string or a sequence of random bytes. UTF-8 mode fits the first case, while hexadecimal mode represents the second without changing the bytes.
- Message: Identify whether the verifier signs the visible message, a canonical request string, a serialized body or a binary envelope. These are different byte sequences even when they display similar content.
- Hash: Select only the SHA variant named by the protocol. A longer hash does not automatically make a signature compatible with a system expecting SHA-256.
- Output: Decide whether the receiving system expects hexadecimal, standard Base64, Base64url or a shortened tag. The tool displays full lowercase hexadecimal and standard padded Base64 representations.
Key and message encodings are independent. A protocol can use a UTF-8 text key with a hexadecimal message, or a random binary key with a UTF-8 body. The two selectors are there because the required formats do not always match.
For published vectors, hexadecimal input is especially useful because it exposes the exact bytes being authenticated. For a large production payload, obtain the canonical bytes from the same source or serialization process used by the verifier. Copying rendered text can introduce a mismatch even when the characters appear identical.
Generate a tag for a large message
- Confirm the protocol requirements. Locate the exact hash algorithm, key format, message construction, canonicalization rule and expected tag format. Confirm that the protocol expects a full HMAC tag rather than a truncated value.
- Choose the hash algorithm. Select SHA-256, SHA-384 or SHA-512 in the generator. Match the named algorithm exactly; do not substitute a different SHA variant because it produces a different tag.
- Set the key and message formats independently. Choose UTF-8 when the field represents literal text. Choose hexadecimal when the protocol supplies exact bytes. For hex input, remove formatting characters and verify that the number of digits is even.
- Enter the exact fields. Paste or type the canonical message and the required key without adding spaces, quotes, prefixes or a trailing newline. Confirm that each decoded field remains within the 1,000,000-byte limit and that neither field is empty.
- Generate the tag. The browser computes the complete HMAC using the selected hash and key. Wait for the result associated with the current input; an identity token prevents an older asynchronous calculation from replacing a newer result.
- Copy the required representation. Choose full lowercase hexadecimal or standard padded Base64. These are two renderings of the same tag bytes, not different authentication algorithms.
- Compare with the verifier. Use the same key bytes, message bytes and algorithm on the receiving side. Compare the complete tag in the encoding specified by the protocol, and investigate any difference before sending the message.
Select the exact output representation
The generator always exposes the full output. Its length follows the selected hash algorithm:
| Algorithm | Full tag length | Lowercase hexadecimal length |
|---|---|---|
| HMAC-SHA-256 | 32 bytes | 64 characters |
| HMAC-SHA-384 | 48 bytes | 96 characters |
| HMAC-SHA-512 | 64 bytes | 128 characters |
A protocol may instead require a truncated tag, an algorithm identifier, a canonical request string, a binary envelope or Base64url. This page does not add those structures, and it does not emit Base64url. Apply such rules only from the protocol specification. Never trim a tag by estimating characters or substitute standard Base64 for Base64url, because the receiving decoder treats them differently.
When both forms are accepted, copy the one named by the specification rather than choosing based on appearance. Hexadecimal and standard Base64 represent identical tag bytes, but a client may validate only one textual representation.
Check the usual sources of a tag mismatch
A verifier holding the same secret and the exact message bytes can calculate the same tag. When the results differ, check these points in order:
- The hash algorithm is identical on both sides.
- The key contains the same bytes, not merely the same visible description.
- The message bytes are identical, including whitespace and line endings.
- UTF-8 and hexadecimal modes were chosen correctly for each field.
- One system is using the full tag while the other expects a specified truncation.
- The output is standard Base64 when the verifier expects Base64url, or vice versa.
- The verifier is signing the canonical request or binary envelope rather than a reformatted display version.
The generator’s implementation is locked to eight full conformance tags from RFC 4231. Those checks cover short keys, repeated binary bytes, keys smaller than the digest and messages that cross hash block boundaries. SHA-256 and SHA-512 are checked across four independent inputs, while SHA-384 remains available through the Web Crypto-defined interface.
Published vectors can confirm that the selected algorithm and output interpretation are correct, but they cannot compensate for a production payload that differs from the verifier’s bytes. Byte identity is the decisive requirement.
Keep large-text authentication secure
HMAC authenticates; it does not encrypt. The message remains readable to anyone who sees it, and anyone who learns the shared key can create valid tags. Successful verification demonstrates consistency with the shared key and message bytes, not confidentiality.
The construction is defined in NIST FIPS 198-1. For operational security, use independently generated, high-entropy key material appropriate to the protocol. Distribute it through a protected channel, use separate keys for separate purposes and rotate a key after compromise.
A human password is not automatically a strong HMAC key. When an application requires a password as key input, use the exact password-based derivation scheme and parameters specified by that application rather than improvising a conversion.
Because the calculation occurs locally, the inputs are not sent to the site server, but the browser tab and device still matter. Avoid entering production secrets on an untrusted device, finish the task in a trusted tab and compare received tags with a constant-time function on the server. These practices preserve the security benefit of HMAC even when the message is large.
If you're weighing options, Morse Code Translator for Large Text: Format and Limits covers this in detail.
If you're weighing options, Binary to Text from Image: Manual and OCR Steps covers this in detail.