
Hash Generator
Generate a hexadecimal hash of UTF-8 text.
Open toolCalculate HMAC-SHA-256, SHA-384, or SHA-512 locally and copy hexadecimal or Base64 output.
Enter the inputs, then select Generate HMAC.
Result will appear here
Browser Web Crypto computes an HMAC from the UTF-8 message and key with the selected SHA algorithm, then represents the bytes as hexadecimal or Base64.
A nonempty key is required, while an empty message is allowed. This produces an authentication code; it does not encrypt the message or verify a remote request.
Web Crypto needs a secure context such as HTTPS or trusted localhost.
Reference: MDN: HMAC signing.

Review the input parameters, allowed value ranges, and worked reference cases for the HMAC Generator below before running your calculation.
| Parameter / Scenario | Default / Sample Value | Rule or Allowed Range | Output / Usage Note |
|---|---|---|---|
| Input: Secret key (UTF-8) | (User supplied) | Input type: password | Required workspace parameter |
| Input: Message | (User supplied) | Input type: textarea | Required workspace parameter |
| Input: Hash algorithm | (User supplied) | Options: SHA-256, SHA-384, SHA-512 | Required workspace parameter |
| Input: Output encoding | (User supplied) | Options: Hexadecimal, Base64 | Required workspace parameter |
Use the exact message and a UTF-8 text key, then choose the required hash and output encoding.
Enter the literal UTF-8 key and exact message, preserving meaningful spaces and line breaks. Select SHA-256, SHA-384, or SHA-512 and the hexadecimal or Base64 output expected by the consumer.
Run the generator and inspect the HMAC output. The result identifies the selected algorithm, byte length, and output encoding; these must match the comparison you intend to make.
Copy the generated code and keep its algorithm and encoding with it. Review the UTF-8 processing note when a comparison differs. A key that looks like hex is still text, and no remote verification occurs.
Compare baseline and alternative runs for HMAC Generator before exporting the result.
Reproduce the message text from an integration example and generate its HMAC using the stated algorithm. If the code differs, compare the exact key representation and message first. A visually similar request body can contain a different newline or different spacing.

Generate hexadecimal and Base64 versions for the same message and algorithm when documenting an interface. They are representations of the authentication code, not separate encryption choices. Keep the encoding label with the copied value so another person can compare like with like.

Use a small known message to isolate the key, algorithm, and encoding before working with a longer payload. A matching small example narrows the investigation, but it does not prove that the full request signing process handles headers or canonicalization correctly.

Review the calculated output alongside your entered parameters and unit conventions.
Every calculation follows the rule: HMAC = keyed message authentication using the selected SHA hash. Both message and key are UTF-8 encoded. Because JavaScript uses IEEE 754 double-precision floating-point arithmetic, numeric outputs display up to 12 significant digits where applicable.
Always cross-check the displayed result against the scope note (Requires HTTPS or a trusted localhost context for Web Crypto. The key is not stored or sent to a server; this is an authentication code, not encryption) before applying the value to production specifications, financial models, or lab records.

Confirm the exact text and selected options before comparing this code with another implementation.
Operational scope: Requires HTTPS or a trusted localhost context for Web Crypto. The key is not stored or sent to a server; this is an authentication code, not encryption. Inputs that violate minimum/maximum bounds or required format rules are rejected with a clear diagnostic prompt.
Need an adjacent calculation in Developer Tools? Use the related tools linked below to chain your workflow without leaving your browser.

Choose another tool for your next calculation, conversion, or text task.

Encode ampersands, angle brackets and quotes, or decode recognized HTML character references without executing markup.
Open tool
Parse and format source with a pinned local Prettier browser bundle.
Open tool
Convert UTF-8 strings to and from RFC 4648 Base64URL format (- and _ alphabet) with optional '=' padding control in your browser.
Open toolEncode Unicode text to Base64 or decode UTF-8 Base64 text.
Open toolAnswers about using HMAC Generator and understanding its results.
No. The entered key is UTF-8 text, even when it contains hexadecimal-looking characters.
Yes, with a nonempty key.
The form offers SHA-256, SHA-384, and SHA-512 HMAC, with hexadecimal or Base64 output.
It changes the message bytes used in the computation. Preserve meaningful whitespace when comparing an expected HMAC.
Choose another tool for your next calculation, conversion, or text task.