HMAC Generator
Generate a message authentication code for a file or typed message. Choose the algorithm and encodings, then copy or download the digest.
- Free
- Works Offline
- No Uploads
How to Generate an HMAC
- Open the HTML, review Security Check, then select Continue.
- Choose a file, type a message, or select Open Sample.
- Choose the message and key encodings, enter the key and check the algorithm and digest encoding.
- Select Generate HMAC, then Copy Digest or Download JSON.
Choose Algorithm and Encodings
- Start with HMAC-SHA-256 or choose HMAC-SHA-512.
- Set the message and key encodings independently. File selection uses the original bytes.
- Copy the digest or download labeled Hex or Base64 JSON.
Formats and Compatibility
| Input | One local file up to 16 MiB, or a typed message decoded as UTF-8, Hex or standard padded Base64. Use a nonempty key up to 64 KiB in any of the same three encodings. |
|---|---|
| Output | A complete 32-byte HMAC-SHA-256 or 64-byte HMAC-SHA-512 digest. The JSON includes algorithm, encoding and tag. The Copy Digest action copies the tag text. |
| Browser | A modern browser with local file support. |
| Scope | One file or message up to 16 MiB, with a nonempty key up to 64 KiB. Requires browser Web Crypto. |
| Operating Systems |
Local Processing Without Uploads
Use the HMAC generator without uploading files. This free browser-based tool runs locally and clears the masked key on each attempt.
Select Open Sample to see the workflow with the included example.
How the Bytes Affect the Digest
The HMAC SHA256 calculator uses the message bytes and the shared secret key to generate a message authentication code. Choose Hex to enter complete byte pairs, Base64 for standard padded input, or UTF-8 for literal text.
Use Your Digest in Another Application
Match the algorithm and exact message and key bytes in the receiving application. Choose the result encoding it accepts. The sample uses the public RFC 4231 message Hi There.
Frequently Asked Questions
Can I use the HMAC generator offline?
Yes. Extract the Tool ZIP and open HMACGenerator.html in a current browser with Web Crypto.
How does the local HMAC generator handle keys?
It uses the key for the requested operation and clears the masked field. Keep the key separately for later verification.
Is there a free HMAC generator?
Yes. The workbench and offline download are free. Processing stays on your device.
Where is the HMAC generator download?
Download Tool ZIP saves the workbench. Download JSON saves the labeled digest.
Can I use the HMAC generator in browser mode?
Yes. Open the downloaded HTML or use a secure browser context that supports Web Crypto.
Does this change or normalize my message?
The selected encoding determines the bytes. For exact file contents, select the file. The browser can normalize line endings in typed fields.
Does this tool work offline on Windows, macOS, Linux, and ChromeOS?
Yes. Local Studio tools run offline on Windows, macOS, Linux, and ChromeOS. Download the tool ZIP, extract it, and open the included HTML file in a supported browser. Your files are processed on your device without uploads.
Which browsers can I use with this offline tool?
Use a current version of Google Chrome, Microsoft Edge, Mozilla Firefox, or Safari where that browser is available for your operating system. Chrome is built into ChromeOS, and Safari is available on macOS.