Home / Developer tools / Hash generator

Hash Generator

One box, every common hash. Type text and see its MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 side by side, with an optional HMAC key.

Try:

The hash is calculated in your browser. Your text is not sent to any server.

What this hash generator does

It calculates six hashes of your input in one step and shows them in a table, each with a Copy button. Choose lowercase hex, uppercase hex or Base64 for the output. Enter a secret key to turn the five cryptographic hashes into HMACs. Paste a known hash in the compare box and the tool tells you which algorithm it matches.

The hashes of hello

AlgorithmHash of hello (hex)
MD55d41402abc4b2a76b9719d911017c592
SHA-1aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
SHA-2562cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-38459e1748777448c69de6b800d7a33bbfb9ff1b463e44354c3553bcdb9c666fa90125a3c79f90397bdf5f6a13de828684f
SHA-5129b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca72323c3d99ba5c11d7c7acc6e14b8c5da0c4663475c2e5c3adef46f73bcdec043
CRC-323610a686

Which hash should I use?

You want toUse
Check that a download is not damagedSHA-256 (or MD5 or SHA-1 if that is what the site publishes)
Protect against a deliberate fakeSHA-256 or SHA-512, from a trusted source
Sign an API request or webhookHMAC-SHA256
Store a passwordNone of these. Use bcrypt or Argon2
Make a short cache key or ETagMD5 or SHA-1 is fine; a truncated SHA-256 is better
Detect random transmission errorsCRC-32

Input types

  • Text (UTF-8). The usual case. Characters such as é or the euro sign take more than one byte, and the hash depends on the exact bytes.
  • Hex bytes. Paste bytes such as 68 65 6c 6c 6f (spaces, colons and 0x are ignored) to hash binary data.
  • Base64. Paste Base64 or Base64URL data and the tool hashes the decoded bytes.

Why a hash differs between tools

  • A final line break was added or left out. Use the option Ignore the final line break.
  • One tool used UTF-16 or another encoding, and this one uses UTF-8.
  • The file has CRLF line breaks and the pasted text has LF. Tick Use Windows line breaks.
  • One side hashed the hex text, and the other the bytes it stands for. Use the Input is setting.

About CRC-32

CRC-32 is a 32-bit checksum that catches random errors in transmission and storage, such as the checks inside ZIP and PNG files. It is not a cryptographic hash: it is easy to create two inputs with the same CRC, so never use it for security.

HMAC

HMAC is a way of using a hash with a secret key. It proves that a message came from someone who knows the key. For new designs use HMAC-SHA256. The SHA256 generator shows a test value you can compare with.

Single-algorithm pages: MD5, SHA1 and SHA256. To hash a file, use the file hash checker. The hash functions guide explains how the algorithms differ. Your input stays in your browser.

Frequently asked questions

What is a hash generator?

It is a tool that turns text or data into a fixed-length fingerprint with a hash function such as MD5, SHA-1 or SHA-256. The same input always gives the same hash.

Which hash algorithm is best?

For security use SHA-256 or SHA-512. MD5 and SHA-1 are only suitable for catching accidental changes. For passwords use bcrypt or Argon2, not a plain hash.

Can I get the original text back from a hash?

No. A hash is a one-way function. Short or common inputs can still be found by guessing.

Why does the same text give different hashes on different sites?

Usually the sites treat line breaks, spaces or the text encoding differently. This tool hashes UTF-8 bytes and lets you control the line breaks.

What does the HMAC key do?

It mixes a secret key into the hash, so that only someone with the key can produce the same value. It is used to sign API requests and webhooks.

Is my text uploaded?

No. All hashes are calculated in your browser.