Hash Generator

Get the MD5, SHA-1, SHA-256, SHA-384, or SHA-512 hash of any text or file. The hash generator can also compare the result with a checksum from a download page.

Updated
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 text in the Text tab, or choose a file up to 200 MB in the File tab.
  2. Tick the Algorithms you need and pick the Output format. To verify a download, paste the expected hash into Compare with.
  3. Press Generate. 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 uses a small audited library, because Web Crypto has no MD5.
  • Files are read in chunks and fed to an incremental hasher, so a large file never has to fit in memory at once.
  • The comparison ignores letter case and spaces around the pasted hash.

Examples

The text hello:

  • MD5 = 5d41402abc4b2a76b9719d911017c592
  • SHA-1 = aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
  • SHA-256 = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
  • 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

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.

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) and HMAC are not supported.
  • Files are limited to 200 MB.

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.

How do I verify a downloaded file?

Open the File tab, choose the file, and paste the checksum from the download page into "Compare with". A match means the file is identical to the original.

Is my file uploaded?

No. The hash is calculated in your browser.

Often used together with the Hash Generator.