Toolvito

Works on this device

Hash Generator & Checker

Make the hash of a text or a file, or check a file against the hash given on its download page. Choose MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA-3, BLAKE2 or CRC-32, or all of them at once. The text and the file are hashed in this browser and are not sent anywhere.

Make or check a hash

Type or paste a text. The hash follows as you type.

It is hashed exactly as it stands, as UTF-8 bytes: spaces, capital letters and line breaks all count.

SHA-256 is the usual choice. MD5 and SHA-1 are only for checking against older hashes.

More options

A text box holds each line break as one LF byte. Choose CR LF to get the hash of the same text saved on Windows.

Useful when a copied text ends with a line break that the original did not have.

The text and the files are hashed in this browser. They are not sent or saved.

The hash will show here

Type a text or choose a file.

How to use the hash generator and checker

  1. Choose what you want to do: make the hash of a text, make the hash of a file, check a text or a file against a hash, or compare two files.
  2. For a text, type or paste it. The hash follows as you type. For a file, choose it on your device; it is read in this browser.
  3. Choose the algorithm. SHA-256 is the usual choice. Choose All of them at once to see every hash in one table.
  4. To check, paste the hash you expect. You can paste the whole text of a checksum file such as SHA256SUMS: the line with the name of your file is used. Leave the algorithm on Find it from the expected hash if you do not know it.
  5. Copy the hash, download it as a line for a checksum file, or download the result as a CSV file.

What a hash is

A hash is a short fingerprint of some bytes. The same bytes always give the same hash, and the smallest change gives a completely different one. SHA-256 always gives 64 hexadecimal digits, for one letter or for a large file.

A hash is not encryption. It cannot be turned back into the text or the file, so there is no "MD5 to text" or "SHA-256 decrypt". Sites that claim to do it only look the hash up in long lists of hashes of known words. This page does not do that.

A text is hashed as its UTF-8 bytes. Capital and small letters, spaces and line breaks all count. A file is hashed as its bytes; its name and dates do not count.

Which algorithm to choose

The algorithms on this page
Algorithm Length in hexadecimal digits Use it for
SHA-256 64 The usual choice: downloads, software releases, file checks.
SHA-384, SHA-512 96, 128 Longer SHA-2 hashes; also used in subresource integrity (sha384-...).
SHA3-224 to SHA3-512 56 to 128 The newer SHA-3 family (FIPS 202).
BLAKE2b-512, BLAKE2s-256 128, 64 Fast modern hashes (RFC 7693), for example from the b2sum program.
SHA-1 40 Older checks only. Broken for security: two files with the same SHA-1 have been made on purpose.
MD5 32 Older checks only. Broken for security; fine to find a damaged download.
CRC-32 8 A checksum for accidental errors, as in ZIP files. Not a cryptographic hash.

For a password, do not use a plain hash such as MD5 or SHA-256. Use a slow password hash: the HMAC & Password Hash Calculator has PBKDF2 and scrypt, and HMAC for messages with a key.

How to check a download

  1. Find the expected hash on the maker's own page, or in its checksum file (often called SHA256SUMS or ending in .sha256). Take it from a source you trust.
  2. Choose Check a file against a hash or a checksum file and choose the file you downloaded.
  3. Paste the hash, or the whole checksum file. A name in front such as sha256: or sha384- is read, and so are the lines of md5sum, sha256sum and sha256sum --tag.
  4. Read the result. Match means you have exactly the bytes the hash was made from. No match means the file differs: it may be damaged, only partly downloaded or another version.

Why a hash may not match

  • A line break at the end. On a command line, echo text | sha256sum hashes the text and a line break. Use printf '%s' text or echo -n text, or here, type the line break into the box.
  • Line breaks of Windows. A text saved on Windows has CR LF at the end of each line. Choose CR LF under More options to get its hash.
  • Another algorithm. A hash of 64 digits may be SHA-256, SHA3-256 or BLAKE2s-256. Find it from the expected hash tries all of them.
  • Capital or small letters in the hash do not matter: hexadecimal reads them the same. In Base64 they do matter.

The same hash on your computer

  • Linux: sha256sum file or md5sum file. Check a list with sha256sum -c SHA256SUMS.
  • macOS: shasum -a 256 file or md5 file.
  • Windows: certutil -hashfile file SHA256 in the command prompt, or Get-FileHash file in PowerShell (SHA-256 unless you name another algorithm).

Worked example

The text "The quick brown fox jumps over the lazy dog" has 43 bytes. Its SHA-256 hash is d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592 and its MD5 hash is 9e107d9d372bb6826bd81d3542a419d6.

Add a full stop at the end and the SHA-256 hash becomes ef537f25c895bfa782526529a9b63d97aa631564d5d789c2b765448c8635fb6c: one character changes the whole hash.

The example file hello.txt holds "Hello, world!" and a line break, 14 bytes. Its SHA-256 hash is d9014c4624844aa5bac314773d6b689ad467fa4e1d1a50a1b8a99d5a95f72ff5. The same line saved with a Windows line break has 15 bytes; Compare two files shows that the files first differ at byte 14.

Limits you should know

  • A file can have at most 64 MB, and one file is hashed at a time. Larger files, such as disk images, need a program on your computer (see above).
  • Text is hashed as UTF-8. For a text in another encoding, hash the file itself, or turn the text into bytes with the Character Encoding Converter and hash those bytes in hexadecimal with the Hash Calculator.
  • A match does not prove that a file is safe or who made it. It only shows that the bytes are the same as the bytes the expected hash was made from.
  • MD5 and SHA-1 are broken for security, and CRC-32 never was secure. Use them only to find accidental changes.
  • Hashes of several texts in a table, CRC-32 in decimal and hashes of bytes typed in hexadecimal are in the Hash Calculator.

Related tools