How to Generate a Hash (MD5, SHA-256) and Check a File

By Daniel · Updated July 2026

A hash is a fixed-length fingerprint of some data. Feed in the same input and you always get the same hash; change a single character and the hash changes completely. That property makes hashes perfect for checking whether two things are identical — like a download and its published checksum.

What a hash is for

  • Verifying downloads — compare the hash of a file you downloaded to the one the publisher lists; if they match, the file is intact.
  • Detecting change — store a hash now and re-check later to see whether a file was modified.
  • Storing passwords — systems store a salted hash, not the password itself, so a breach does not immediately reveal it.

How to generate one

  1. Open the hash generator.
  2. Paste your text and pick the algorithm — prefer SHA-256 over MD5 or SHA-1.
  3. Copy the hash. It is computed in your browser, so your input stays private.

A hash is one-way

You cannot 'decrypt' a hash back into the original data — the process deliberately throws information away. The only way to find what produced a hash is to try inputs until one matches, which is why weak, unsalted hashes of common passwords can be cracked and strong, salted ones resist it.

MD5 and SHA-1 are fine for a quick 'did this file change?' check but are considered broken for security. Use SHA-256 whenever the answer actually needs to be trustworthy.

Hash Generator
Generate MD5, SHA-1 and SHA-256 hashes of text, in your browser.
Open the tool →

Common questions

Can I reverse a hash to get the original?

No. Hashing is one-way. The only approach is guessing inputs until one produces the same hash.

Which algorithm should I use?

SHA-256 for anything security-related. MD5 and SHA-1 are acceptable only for casual integrity checks.

How do I verify a download?

Generate the file's hash and compare it, character for character, to the checksum the publisher provides.

Is my input uploaded?

No. The hash is computed locally in your browser.

Keep reading

How to Create a Strong Password · How to Generate a UUID · How to Encode and Decode Base64