HMAC-Generator
Free online hmac-generator. Process data instantly in your browser. No upload, no signup, fully private.
How to Use
- Paste or type your text into the HMAC-Generator input area above.
- Configure any format or mode options to generate the result in real time.
- Click Copy to copy the formatted result to your clipboard, or Reset to clear the workbench.
What is HMAC-Generator?
An HMAC Generator computes a Hash-based Message Authentication Code from a message payload, a shared secret key, and a cryptographic hash function (SHA-1, SHA-256, SHA-384, or SHA-512). Backend engineers and security testers use HMAC signatures to verify API request integrity and webhook authenticity.
How It Works
When you enter a message and non-empty secret, the tool encodes both with TextEncoder, imports the secret as an HMAC key via crypto.subtle.importKey("raw", ..., { name: "HMAC", hash: alg }, false, ["sign"]), and signs the message using crypto.subtle.sign("HMAC", key, ...). Output bytes are formatted as lowercase hex or padded Base64 completely locally.
Common Use Cases
- Verifying webhook signatures — reproduce HMAC-SHA256 hex or Base64 digests for Stripe, GitHub, or Slack test payloads
- Testing REST API authentication headers — generate HMAC-SHA512 or HMAC-SHA384 signatures during client integration
- Comparing hex vs. Base64 encodings — switch output encoding without retyping your message or secret key
- Protecting secret signing keys — compute HMACs strictly via Web Crypto in-browser so secrets never touch a server
Technical Details
API: Web Crypto crypto.subtle.importKey + crypto.subtle.sign (HMAC). Algorithms: SHA-1, SHA-256 (default), SHA-384, SHA-512. Output encodings: lowercase hex (bytesToHex) or standard Base64 (bytesToBase64). Requires non-empty secret; runs locally.
FAQ
Is this HMAC-Generator free?
Yes, completely free. No signup required.
Does this tool upload my data?
No. All processing happens locally in your browser. Your data never leaves your device.