Skip to content
Message + Key → HMACDeveloper tools

HMAC Signature Generator

Create HMAC-SHA256, SHA512, SHA384 or SHA1 signatures from text or a file, check a signature you received, and get the code in four languages.

Did this tool work for you?

Used HMAC Signature Generator? Share how it went to help others.

About this tool

About HMAC Signature Generator

HMAC Signature Generator makes the keyed signature that APIs and webhooks use to prove that a message is genuine and was not changed. Choose SHA256, SHA512, SHA384 or SHA1, enter the secret key and the message, and the signature appears as you type in hex, uppercase hex, Base64 and Base64URL, each with its own copy button. The secret can be plain text, hex or Base64, because services hand out keys in different forms and using the wrong form is one of the most common reasons why signatures do not match. The message can also be text, hex or Base64, or you can choose a file up to 100 MB, which is useful for a saved webhook body. To verify a request, paste the signature you received in the check box. It may be hex, Base64 or Base64URL, and may start with a label such as sha256= or v1=. The tool tells you whether it matches, and if it does not, what to look at first. The result is the same as in your own code: with the key Jefe and the message “what do ya want for nothing?”, HMAC-SHA256 gives a value that starts with 5bdcc146 and ends with c3843, exactly as published in RFC 4231, the official test values. Below the result is ready code for Node.js, Python, PHP and the terminal that makes the same signature with your chosen algorithm and key format. An HMAC is not encryption: the message stays readable. It is also different from a plain hash, because without the secret key nobody can make a valid signature. SHA256 is the usual choice today. SHA1 is included because some older services still ask for it; do not choose it for new work. Keys, messages and files are handled in your browser with Web Crypto and are never sent.

HMAC Signature Generator tool

Where HMAC signatures are used

Trust a message before you act on it

Webhooks

Check that a payment or repository event is genuine.

ExamplePaste the body, the secret and the header value.

Signing API requests

Compare your code with a known result.

ExampleYour signature differs? Check the key format first.

JWT with HS256

See the signature part of a token.

ExampleSign the header and payload joined by a dot and take Base64URL.

File integrity

Prove that a file was not changed.

ExampleSign it with a key both sides know.

Debugging

Find out why a check fails.

ExampleA line break at the end of the body changes everything.

Learning

Change one letter and watch the signature change.

ExampleCompare with the RFC 4231 test values.

HMAC tips

Why signatures do not match

Sign the raw body

Parsing JSON and writing it again changes spaces and order. Use the exact bytes you received.

Check the key format

A key shown as hex or Base64 may have to be decoded first.

Compare in constant time

On a server use timingSafeEqual, hmac.compare_digest or hash_equals.

Include a time

Sign a timestamp with the message and refuse old ones, so a request cannot be repeated.

Make a good secret

Use at least 32 random bytes.

Open Token Generator

Working with tokens?

Decode a JWT and verify its signature.

Open JWT Decoder
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed HMAC Signature Generator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 24 November 2026

Answers and guidanceFrequently Asked Questions
What is an HMAC?
A signature made from a message and a secret key with a hash function. It proves the message came from someone with the key and was not changed.
How do I verify a webhook signature?
Enter the webhook secret and the raw request body, then paste the signature from the header into the check box.
Why does my signature not match?
Usually the key format, the algorithm, or the exact message: spaces, line breaks and the order of JSON keys all count.
Which algorithm should I use?
SHA256, unless the service asks for another. Avoid SHA1 for new work.
Is HMAC encryption?
No. The message stays readable; HMAC only protects against changes and forgery.
Can I sign a file?
Yes, any file up to 100 MB. It is read in your browser.
Is my secret key sent anywhere?
No. Everything is calculated in your browser.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.