HMAC generator
Compute an HMAC signature of a message with a secret key, as hex or base64.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/hmac \
-H 'Content-Type: application/json' \
-d '{"input":{"message":"what do ya want for nothing?","key":"Jefe"}}'
import json, urllib.request
body = {'input': {'message': 'what do ya want for nothing?', 'key': 'Jefe'}}
request = urllib.request.Request("https://setget.net/v1/tools/hmac", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/hmac", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"message":"what do ya want for nothing?","key":"Jefe"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "hmac",
"input": {
"message": "what do ya want for nothing?",
"key": "Jefe"
}
}
{
"input": {
"message": "what do ya want for nothing?",
"key": "Jefe"
}
}
Endpoint: POST /v1/tools/hmac. Over MCP: run_tool with slug: "hmac".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
message |
string | yes | The message to sign. |
key |
string | yes | The secret key. Use a test key here, never a production secret. |
algorithm |
string | no | The hash function to use. One of: md5, sha1, sha256, sha384, sha512, sha3-256, blake2b. Default: "sha256". |
key_encoding |
string | no | How the key is written: plain text (UTF-8), hex digits or base64. One of: text, hex, base64. Default: "text". |
output |
string | no | How to write the result. One of: hex, base64. Default: "hex". |
Examples
Input
{
"message": "what do ya want for nothing?",
"key": "Jefe"
}Result
{
"text": "5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843",
"algorithm": "sha256",
"bits": 256
}A hex key with SHA-1
Input
{
"message": "The quick brown fox jumps over the lazy dog",
"key": "6b6579",
"key_encoding": "hex",
"algorithm": "sha1"
}Result
{
"text": "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9",
"algorithm": "sha1",
"bits": 160
}Questions
- Is it safe to enter my real secret key?
- No. Never send a production secret to any online tool. Nothing is stored here, but a real key should stay on your own systems. Test with a throwaway key.
- Why does my webhook signature not match?
- Sign the raw request body exactly as received, byte for byte. Re-formatted JSON, a different line ending or a key given as text when it is really hex will all change the result.
- Is HMAC with MD5 or SHA-1 broken?
- HMAC holds up better than the plain hashes, but new systems should use SHA-256 or stronger.
Related tools
- Hash generatorCompute an MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256 or BLAKE2b hash of text or bytes.
hash - All hashes at onceCompute every supported hash of one input at once: MD5, SHA-1, SHA-2, SHA3-256 and BLAKE2b.
hash-all - JWT decoderDecode the header and payload of a JSON Web Token and show its times, without verifying it.
jwt-decode - Base64 encoder and decoderEncode text to Base64 or decode it back, in the standard or URL-safe alphabet.
base64 - Base32 encoder and decoderEncode text to Base32 (RFC 4648) or decode it back, with or without padding.
base32 - Base58 encoder and decoderEncode text or bytes to Base58 with the Bitcoin alphabet, or decode Base58 back.
base58