Skip to content

Hash generator: MD5, SHA-256 and SHA-512 for text and files

Type text or drop a file to get its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once. Paste the checksum a website publishes to confirm that a download is complete and unchanged, or add a secret key to make an HMAC. Files are read only by your browser, so even large or private files never leave your device.

Quick answer

To get a SHA-256 or MD5 hash, type or paste the text, or choose File and pick the file: all five hashes appear together, each with a copy button. To verify a download, paste the published checksum into the compare box, and a green message names the algorithm that matches.

Based on NIST FIPS 180-4: Secure Hash Standard (SHS) · Page updated 23 October 2026

Editor: Abuzar, founder of NeedMyToolsHow we check facts

Text is hashed as UTF-8, the same as most systems.

Choose a file to see its hashes.

Hashed on your device. Nothing is uploaded or saved.

How to use the Hash Generator (MD5, SHA-256)

  1. Choose Text and type or paste, or choose File and pick or drop the file.
  2. Read the five hashes and switch the output to upper-case hex or Base64 if the other system expects it. For text, set the line endings or trimming when your hash has to match one made elsewhere.
  3. Paste a published checksum into the compare box to check it, then copy a hash or download the checksum list or a .sha256 file.

What a hash is

A hash function turns any amount of data into a short fingerprint of fixed length: 128 bits for MD5, 160 for SHA-1, 256 for SHA-256, shown as 32, 40 or 64 hexadecimal characters. The same input always gives the same hash, and changing one letter or one byte gives a completely different one. There is no way to turn a hash back into the data. That makes hashes the standard way to confirm that two files are identical without comparing them byte by byte, to detect a damaged or incomplete download, and to notice when a document was changed after it was shared.

Checking a download against its published checksum

Software and operating-system websites often list a SHA-256 value next to each download. Choose File, pick the file you downloaded and paste the published value into the compare box. The tool accepts the usual ways of writing it: the bare hash in upper or lower case, a line from the sha256sum command such as the hash followed by two spaces and the file name, and the BSD style SHA256 (file.iso) = hash. It works out the algorithm from the length and tells you which one matches. If nothing matches, your file is not the one the site published: download it again from the official site and do not run it.

MD5 and SHA-1 catch errors, not attacks

RFC 6151, the IETF update to the security notes of MD5, says published attacks make it unwise to use MD5 where collision resistance is needed, because people can deliberately create two different files with the same MD5. It still catches accidental damage, and many older systems publish it. NIST announced in December 2022 that SHA-1 should be phased out by 31 December 2030 in favour of the SHA-2 and SHA-3 families. Wherever someone might cheat, such as checking software or signing documents, use SHA-256 or longer. The SHA hashes here come from your browser's built-in Web Cryptography API, which implements the FIPS 180-4 standard; MD5, which browsers do not offer, is computed by our own code and tested against the RFC 1321 test suite.

Why the same text can give a different hash

A hash works on bytes, not on what you see. Text is converted to UTF-8, the encoding the web uses, so Arabic and emoji give the same hash here as on Linux, macOS and in most programming languages. The usual cause of a mismatch is invisible: Windows ends lines with CR LF and Linux with LF, a copied value can carry a trailing space or line break, and some editors add a line break at the end of a file. Use the line-ending and trim options to match the other system. Files are hashed exactly as stored, byte for byte, so renaming a file does not change its hash.

HMAC, signatures and passwords

An HMAC, defined in RFC 2104, mixes a secret key into the hash, so only someone who knows the key can produce or check the value. Payment gateways and webhooks commonly sign the messages they send with HMAC-SHA-256; paste a message body and your signing secret here to see the signature your server should compute. The key is used only on this page and is never stored. Do not use a plain hash, even SHA-256, to store passwords: they need a slow, salted method such as bcrypt, which our htpasswd generator uses. To create a strong password, use the password generator.

Frequently asked questions

How do I check the SHA-256 of a downloaded file?

Choose File and pick the downloaded file, then paste the SHA-256 value from the official download page into the compare box. A green Match message means the file is exactly the one published; anything else means you should download it again.

Can a hash be decrypted back into the original text?

No. A hash is not encryption: it has no key and throws information away, so there is nothing to decrypt. Sites that claim to decrypt MD5 only look the hash up in lists of common words and passwords, which is why short or common inputs can be found and long random ones cannot.

Why is my MD5 different from the one another tool gave me?

Almost always the input differs by something you cannot see: CR LF instead of LF line endings, a space or line break at the end, or text saved in another encoding. Try the line-ending and trim options. The hash of identical bytes is the same everywhere.

Is it safe to use this hash generator on a private file?

Yes. The file is read by your browser and hashed on your device; nothing is sent to a server and the page keeps no copy. You can check this by turning off your internet connection after the page loads: hashing still works.

Which hash algorithm should I use?

Use SHA-256 for anything new, or SHA-384 or SHA-512 if a system asks for them. Use MD5 or SHA-1 only to compare with a value that is already published in that form, because both have known weaknesses.