Hash Generator

Input

The text is hashed as UTF-8. Line breaks count as a single line feed (LF) character.

Output format

Paste a checksum from a download page, in hex (colons and spaces are ignored) or Base64.

Result

Calculating…

MD5 and SHA-1 are broken: attackers can create different inputs with the same hash. Use them only for checksums and legacy systems, never for passwords or signatures. Store passwords with a slow password hash such as Argon2, scrypt or bcrypt, not with any of these fast hashes.

Processed locally in your browser. Your input is not uploaded or saved by this tool.

About this tool

This hash generator calculates MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 values of text or a file at the same time. Paste the checksum published on a download page into the comparison field and the tool tells you which algorithm matches, so you can verify that a file arrived complete and unchanged.

In HMAC mode it combines the message with a secret key, as APIs and webhooks do to sign requests. Results can be shown in hexadecimal, in uppercase, or in Base64. Everything is calculated in your browser: SHA hashes with the built-in Web Crypto API and MD5 with a small implementation that is tested against the official RFC 1321 values.

How it works

Choose Text or File. Text is hashed as UTF-8 bytes while you type; a file of up to 256 MB is read on your device and hashed in a background worker. All algorithms run together, and every value has a copy button.

A hash function turns input of any length into a fixed-length fingerprint: 128 bits for MD5, 160 for SHA-1 and 256, 384 or 512 for the SHA-2 family. Changing a single bit of the input changes the whole value. CRC-32 is a 32-bit checksum that detects accidental damage, but it is easy to forge and is not a cryptographic hash.

HMAC (RFC 2104) computes H((K⊕opad)∥H((K⊕ipad)∥m))H((K \oplus \text{opad}) \| H((K \oplus \text{ipad}) \| m)) for a key KK and message mm. The receiver recomputes it with the same key to check that the message came from someone who knows the key and was not modified.

Example

The text abc has the MD5 hash 900150983cd24fb0d6963f7d28e17f72 and the SHA-256 hash ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad; both are the reference values from RFC 1321 and FIPS 180-4. Adding a single space after abc changes every character of both hashes.

To verify a download, choose the file and paste the published SHA-256 value into the comparison field. If the tool reports Match: SHA-256, the file is identical to the one the publisher hashed. With HMAC mode, the key Jefe and the message what do ya want for nothing? give the HMAC-SHA-256 value 5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843, the test vector from RFC 4231.

Assumptions and limits

Files are limited to 256 MB because they are read into memory. Text is encoded as UTF-8, and the text box turns Windows line breaks into single line feeds, so hashing a file can differ from hashing the same text pasted in. SHA hashes need a secure (HTTPS) page; MD5, CRC-32 and HMAC-MD5 work everywhere. The HMAC key is entered as text, not as hex bytes. The tool calculates hashes; it cannot reverse them. Nothing is uploaded, and links carry only the settings: never the text, the key or the file.

Frequently asked questions

How do I verify a file checksum?

Switch to File, choose the downloaded file and paste the checksum from the publisher's website into Compare with an expected hash. The tool compares it with every algorithm and shows which one matches. Case, spaces and colons in the published value do not matter.

Is MD5 or SHA-1 safe to use?

Not for security. Researchers have produced different files with the same MD5 and the same SHA-1 hash, so neither can prove that data is authentic. They are still fine for detecting accidental corruption and for old systems that require them. Use SHA-256 or stronger for new work.

Can I hash passwords with this tool?

You can calculate the hash, but plain MD5, SHA-1 and even SHA-256 are the wrong way to store passwords: they are fast, so attackers can test billions of guesses per second. Password storage needs a slow, salted password hash such as Argon2id, scrypt or bcrypt.

Can a hash be decrypted?

No. A hash is a one-way function, not encryption, and many inputs share each value. Short or common inputs can sometimes be found by trying candidates or looking them up in precomputed tables, which is why secrets should never be protected by a plain hash.

What is the difference between a hash and an HMAC?

Anyone can compute a hash, so it only shows whether data changed. An HMAC also uses a secret key, so only someone with the key can produce a valid value. Webhooks from payment providers and many APIs sign their messages with HMAC-SHA-256.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
sourceInputone of: text, filedefault text
textText to hashnot accepted in links: enter it on the page
hmacHMAC with a secret keytrue or falsedefault false
hmac_keySecret keynot accepted in links: enter it on the page
encodingOutput formatone of: hex, base64default hex
uppercaseUppercase letterstrue or falsedefault false
expected_hashCompare with an expected hashtext in the tool's notation, see the examples; your own text; Copy link includes itoptional

Examples

  • ?encoding=base64
  • ?hmac=true&uppercase=true&expected_hash=E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="hashes"]