Tools
English

Neogie HMAC · Security and network

HMAC Generator: SHA-256, SHA-512, SHA-1

Enter a message and a key: the authentication code appears, ready to compare with a signature you received.

Results

Everything happens in your browser: nothing you type is sent.

What is an HMAC?

An HMAC (RFC 2104) is a code computed from a message and a secret key, using a hash function. Whoever knows the key can check that the message comes from a holder of that key and has not been altered. It authenticates but hides nothing: the message stays readable.

Verifying the signature of a call

Many services sign their notifications (webhooks) with an HMAC. Paste the body you received, exactly as it arrived, enter the key, then put the signature into the “Expected hash” box. It can be hexadecimal or Base64, with the sha256= prefix.

If the signature does not match, check line breaks and spaces: a single different byte is enough. Also check the format of the key: text, hexadecimal or Base64.

Using the key properly

  • Use a random key of at least 32 bytes for HMAC-SHA-256.
  • Never put it in the code of a web page or in an address.
  • In a program, compare signatures in constant time.
  • For a new system, choose SHA-256 or above.

Frequently asked questions

Is my key sent or saved?

No. The calculation happens in your browser; neither the key nor the message is uploaded or kept. Still, avoid typing a production key on a shared device.

How is it different from a plain hash?

Anyone can recompute a hash. An HMAC requires the key: a third party cannot forge it.

Is HMAC-SHA1 still safe?

Known attacks on SHA-1 do not break HMAC-SHA1, but SHA-256 is preferred for any new project.

Does an HMAC encrypt the message?

No. To make it unreadable you need encryption, such as AES.

What if a key has leaked?

Replace it at once, both with the service that issued it and in your application: whoever holds it can create valid signatures.

Similar tools