Hash Generator: MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of text or files, with HMAC

Input
Letters

About Hash Generator

This tool turns text or a file into a fixed-length fingerprint called a hash or digest. It shows MD5, SHA-1, SHA-256, SHA-384 and SHA-512 together, so you can copy whichever one you need. The same input always gives the same hash, and any change to the input, even one character, gives a completely different one.

Hashes are used to check that a download arrived intact, to compare two files without opening them, and to sign API requests (with HMAC). SHA digests come from your browser's Web Crypto API. MD5 is not part of Web Crypto, so this page includes its own small implementation, tested against the official RFC 1321 vectors.

Everything runs on your device. Text and files are never uploaded.

How to use it

  1. Choose Text and type or paste, or choose File and drop a file in. Big files show a progress bar.
  2. Read the five hashes. Switch between lowercase and uppercase letters, and press Copy beside the one you want.
  3. To check a download, paste the published hash into the compare field. It says Match or No match, and highlights the algorithm that matched.
  4. For a keyed hash, tick HMAC and enter the secret key.

Frequently asked questions

Which hash algorithm should I use?

Use SHA-256 for checksums and integrity checks, or SHA-512 if you want a longer digest. MD5 and SHA-1 are broken for security, since attackers can craft collisions, but they are still common for spotting accidental corruption and for matching the checksums that older downloads publish.

How do I check a downloaded file against its published hash?

Choose File, drop the download, then paste the published hash into the compare field. The tool ignores case, spaces and a leading 0x, and tells you whether it matches one of the five digests. The matching row is highlighted so you can see which algorithm the publisher used.

What is HMAC mode?

HMAC mixes a secret key into the hash, so only someone with the same key can produce the same result. It is used to sign API requests and webhooks. Tick HMAC, enter the key as text, and every row switches to HMAC-MD5, HMAC-SHA-1 and so on. An empty key is not allowed.

Is this safe for sensitive text or files?

Yes. Hashing runs entirely in your browser. SHA digests use the built-in Web Crypto API, and MD5 is a small script on this page. Nothing is uploaded, sent or stored.

Is there a file size limit?

There is no set limit, only the memory your browser has. The file is read in pieces with a progress bar, then hashed. Very large files, several gigabytes, may fail on devices with little memory; the tool says so instead of freezing.

Why does my text give a different hash than another tool?

Text is hashed as UTF-8 exactly as typed, including spaces and line breaks. A trailing newline, Windows line endings or a different encoding such as UTF-16 changes the result. If a command-line echo adds a newline, use echo -n, or hash the file instead.