Hash Generator

Get the MD5, SHA-1, SHA-2, SHA-3, or Keccak-256 hash of any text, several at once if you like. The hash generator can also compare the result with a checksum you already have.

Hashed in your browser. Your text is not uploaded.

Hashed as UTF-8. A trailing space or line break changes the hash.

Algorithms

How to use the Hash Generator

  1. Type or paste text into Text to hash.
  2. Tick the Algorithms you need and pick the Output format. To verify a value, paste the expected hash into Compare with.
  3. The rows update as you type. Each algorithm gets its own row with a copy button, and a match or no-match badge when you are comparing.

How it works

A hash function turns any input into a fixed-length value. The same input always gives the same hash, and changing a single character gives a completely different one.

  • Text is hashed as UTF-8 bytes.
  • SHA-1, SHA-256, SHA-384, and SHA-512 use the browser's Web Crypto API (crypto.subtle.digest).
  • MD5, the SHA-3 sizes, and Keccak-256 use a small audited WebAssembly library served from this site, because Web Crypto has none of them.
  • The comparison ignores letter case and spaces around the pasted hash, and accepts hex or Base64.

Examples

The text hello:

  • MD5 = 5d41402abc4b2a76b9719d911017c592
  • SHA-1 = aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
  • SHA-256 = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
  • SHA3-256 = 3338be694f50c5f338814986cdf0686453a888b84f424d792af4b9202398f392
  • SHA-256 in Base64 = LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=

An empty string has the SHA-256 hash e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.

Hash algorithms compared

AlgorithmOutput sizeHex lengthStatus
MD5128 bits32Broken, checksums only
SHA-1160 bits40Broken, checksums only
SHA-256256 bits64Secure
SHA-384384 bits96Secure
SHA-512512 bits128Secure
SHA3-256256 bits64Secure
SHA3-512512 bits128Secure
Keccak-256256 bits64Secure, used by Ethereum

You can often tell which algorithm produced a checksum from its length alone. A 64-character hex string on a download page is almost always SHA-256, although SHA3-256 and Keccak-256 have the same length.

Limitations

  • A trailing newline changes the hash. It is the most common reason a hash doesn't match, so check for an extra line break at the end of your text.
  • MD5 and SHA-1 are not secure for passwords or signatures. Use them for checksums only.
  • Password hashing (bcrypt, Argon2) is not done here. HMAC has its own HMAC Generator.
  • The tool hashes text. It does not open files.

Frequently asked questions

What is a hash?

A fixed-length fingerprint of data. Changing even one character of the input produces a completely different hash.

Can a hash be reversed?

No. Hash functions are one-way. You can only check whether some input produces the same hash.

Which algorithm should I use?

Use SHA-256 for checksums and integrity checks. MD5 and SHA-1 are still used for older checksums but are broken for security purposes.

Can I check a hash I was given?

Yes. Paste the text into the box and the expected hash into "Compare with". Tick the algorithm that produced it, or tick several if you are not sure, and look for the Match badge.

How do I get only the MD5 or SHA-256 hash?

Untick the other algorithms and leave the one you need ticked. The page then shows a single row. The same works for SHA-1, SHA-384, SHA-512, and each SHA-3 size.

Often used together with Hash Generator.

  • File Hash Generator

    Checksums of local files, with a match check and SHA256SUMS verification.

  • HMAC Generator

    Signs text or files with HMAC-SHA256 and other hashes, and checks signatures.

  • Bcrypt Generator

    Creates bcrypt password hashes and checks passwords against existing hashes.