PUBLIC.INTERNET

Hash Generator (SHA256, MD5, SHA512)

Hash text or a file with MD5, SHA-1, SHA-256 or SHA-512 and compare the result with a checksum you were given. SHA hashes come from the browser's Web Crypto API, and MD5 from a built-in implementation checked against the RFC 1321 test suite. Text is hashed as UTF-8 and files byte for byte, so a UTF-8 file with LF line endings and no byte order mark gives the same digest as its text pasted in. Hashing makes no network request: the text and files stay in the tab.

Hash Algorithm

Text is hashed as UTF-8. Line endings are hashed as LF, whatever the source used, so hash the file when you need the exact bytes. Empty input hashes the empty message.

The file's bytes are hashed unchanged. MD5 reads the file in pieces. SHA hashes need the whole file in memory, so files over 1 GiB are refused.

Hash Result


      

How to Generate a Hash Online

  1. Pick a Hash Algorithm: MD5, SHA-1, SHA-256 or SHA-512. SHA-256 is selected when the page loads.
  2. Type or paste into Text Input, or choose a file under Or Upload a File. The hash updates as you type.
  3. Switch algorithms to re-hash the same text or file without choosing it again.
  4. Paste a checksum into Expected Hash: a hash, a line from a checksum file such as SHA256SUMS, or the whole file. It says Match (for a whole file, naming the matching line by its file name or line number), Does not match when no line has the hash, or that no hash of the selected algorithm's length was found. Press Copy to copy the hash.

Why the same text can give two different hashes

Hashes cover bytes, not what you see: A hash of text and a hash of a file only agree when the bytes agree. A trailing newline, CRLF versus LF line endings, or a byte order mark each change the digest completely. This page hashes text as UTF-8 with LF line endings, so hash the file itself when you need the bytes on disk.

A match is only as trustworthy as the checksum: If the checksum sits on the same server as the download, whoever can change one can change both. MD5 and SHA-1 also have practical collision attacks (RFC 6151, and the 2017 SHAttered attack on SHA-1), so use them to catch corruption, and prefer SHA-256 or SHA-512 when someone might tamper with the file. A pasted checksum file gives Match when any line holds the hash, so check that the line it names is the file you downloaded.

Not for storing passwords: MD5 and plain SHA-256 are built to be fast, which lets an attacker test billions of guesses per second. A salt does not fix that. Store passwords with a deliberately slow password hash such as Argon2id or bcrypt, as the OWASP Password Storage Cheat Sheet advises.