Skip to content

Security

HMAC generator

Sign a message with a secret key using HMAC-SHA.

Private Everything on these pages runs in your browser. What you type is never sent to a server and nothing is stored.

How to use it

  1. Enter the message and the secret key.
  2. Choose the hash algorithm.
  3. Copy the HMAC; compare it with the value your API or webhook sent.

Example

Input

key: secret
message: hello

Result

HMAC-SHA-256: 88aab3ede8d3adf94d26ab90d3bafd4a2083070c3bcce9c014ee04a443847c0b

Frequently asked questions

When is HMAC used?

To prove that a message came from someone who knows a shared secret and was not changed, for example webhook signatures and signed API requests.

Why not just hash the key and message together?

Naive constructions can be attacked. HMAC is the standard, well-analysed way to mix a key into a hash.

Related articles