Hash Generator: MD5, SHA-256 and HMAC

Hash any text or file with MD5, SHA-1, SHA-256, SHA-384 and SHA-512, or create an HMAC with a secret key, and compare with a published hash to verify a download.

Compute a hash
SHA-256 9f86d0…MD5 098f6b…Hash matches

Generator

Algorithms and their uses

AlgorithmLengthUse
MD5128 bitFile checksums only, not security
SHA-1160 bitLegacy, being replaced
SHA-256256 bitMost common today: certificates and downloads
SHA-512512 bitHigher security, longer hash
HMAC—Keyed hash to verify API messages

Hashes and passwords

Do

  • Use password_hash() in PHP, bcrypt or Argon2 for passwords
  • Compare SHA-256 hashes of files you download

Avoid

  • Do not store passwords as plain MD5 or SHA-256
  • Do not treat a hash as reversible encryption; it is one-way

Example: verify a downloaded file

Many projects publish a SHA-256 hash next to the download link. Choose the file here and paste the published hash into the compare box. A match means the file is exactly as published; if it does not match, do not install it.

Key terms

Short definitions of what you meet along the way.

Hash
A fixed-length fingerprint of data that changes completely if one character changes.
HMAC
A hash computed with a secret key, proving a message came from the key holder.
Salt
A random value added to a password before hashing to defeat precomputed tables.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Can a hash be reversed?

No. Hashing is one-way, but short common inputs can be guessed, which is why passwords need special algorithms.

Are my files uploaded?

No. Hashing runs in your browser.

How do I hash in a terminal?

Linux: sha256sum file; Windows: certutil -hashfile file SHA256.

Building a system or app?

We build custom systems and APIs for your business.

Contact us on WhatsApp