HMAC Generator

Live

HMAC Generator creates an HMAC, a code that proves a message was signed with a secret key, using SHA-1, SHA-256, SHA-384 or SHA-512.

Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.

What is HMAC Generator?

HMAC Generator creates an HMAC, a code that proves a message was signed with a secret key, using SHA-1, SHA-256, SHA-384 or SHA-512. An HMAC proves a message came from someone who knows the key. Do not paste a live production secret into any website you do not trust.

How It Works

  1. Enter a message (text or a file), a secret key and an algorithm in the input fields on this page.
  2. Press the button to run HMAC Generator.
  3. Read the HMAC as hex and Base64, with a check against a value you paste in the result area, and copy or download it.

Common Uses

Good to Know

Paste the signature you were sent into the check box to see at once if it matches.

How it works

Type or paste the message, or choose a file. Type the secret key and say whether it is text, hex or Base64. Pick HMAC-SHA256 (the most common), SHA-1, SHA-384 or SHA-512 and the result appears at once as hex, Base64 and URL-safe Base64.

To check a signature you were sent, paste it into the box at the bottom. It says Matches if it equals the result in hex or Base64, in any letter case.

Worked example

Results were compared with Python's hmac and hashlib modules for all four algorithms, empty and very long messages, empty and very long keys, accented, Japanese and emoji text, and hex and Base64 keys. A 300 KB random file was also checked.

Limits

The message is read as UTF-8 text, so the same words in another encoding give a different result. Webhook services often sign the exact raw body, so paste it without changing spaces or line breaks. Files up to 100 MB. Never paste a live production secret into a website you do not trust.

Frequently Asked Questions

Why does my result not match the service?

Usually the message differs by a space or line break, the key is in a different format (text, hex or Base64), or the algorithm is different.

Can I use an empty key?

Yes, it works like a key of zero bytes, the same as most libraries.

Is my key uploaded?

No. It is processed in your browser.

What does HMAC Generator do?

HMAC Generator creates an HMAC, a code that proves a message was signed with a secret key, using SHA-1, SHA-256, SHA-384 or SHA-512. An HMAC proves a message came from someone who knows the key. Do not paste a live production secret into any website you do not trust.

What do I need to enter in HMAC Generator?

A message (text or a file), a secret key and an algorithm.

Is my data private in HMAC Generator?

Your message, file and key stay in your browser and are not uploaded.

Is MyToolDock HMAC Generator free to use?

Yes, MyToolDock HMAC Generator is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.

Related Tools

.env and .properties to JSON Converter .env File Validator Ascii85 Encoder and Decoder Base32 Encoder and Decoder Hex to Base64 Converter htaccess Redirect Generator

More Developer Tools guides

More in Developer Tools · Browse all tools

Developer Scratchpad

Copied to clipboard!