Hash Generator (MD5, SHA-1, SHA-256, SHA-512)

Get the MD5, SHA-1, SHA-256 and SHA-512 digest of any text or file at once. Handy for verifying downloads, comparing content and checking that two files are identical.

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

  1. Type or paste text into the box. All four hashes update as you type.
  2. To hash a file instead, use the file chooser. The file is read locally and never uploaded.
  3. Click Copy next to the algorithm you need. Tick "Uppercase hex" if the other system compares uppercase strings.
  4. To verify a download, compare the result with the checksum published by the vendor. Use SHA-256 or SHA-512 if one is offered.

What a hash function does

A cryptographic hash function turns input of any size into a fixed-size fingerprint. The same input always gives the same output, a tiny change gives a completely different output, and the original cannot be recovered from the hash. The output length is 128 bits for MD5 (32 hex characters), 160 bits for SHA-1 (40), 256 bits for SHA-256 (64) and 512 bits for SHA-512 (128).

Text is converted to bytes with UTF-8 before hashing. A different text encoding, a trailing newline or an invisible space produces a different hash, which is the usual reason two tools disagree.

Which algorithm to use

MD5 and SHA-1 are broken for security purposes: practical collision attacks exist, and a public SHA-1 collision was demonstrated in 2017. They remain fine for detecting accidental corruption or as cache keys, but not for signatures or integrity checks against an attacker. Prefer SHA-256 or SHA-512 when security matters.

Do not use any of these plain hashes to store passwords. They are designed to be fast, which helps attackers who guess passwords. Use a slow password hashing function such as bcrypt, scrypt or Argon2 with a unique salt. SHA algorithms here are computed with the browser's Web Crypto API; MD5 is not part of Web Crypto and is implemented in this page's own code.

Frequently asked questions

Can a hash be reversed to get the original text?

No. A hash is one-way. Attackers recover simple inputs by guessing and comparing hashes, which is why short or common values are not safe even when hashed.

Why does my hash differ from another tool or command?

Usually the input differs by a byte: a trailing newline (echo adds one by default), different line endings, or a different character encoding. This tool hashes exactly the characters in the box as UTF-8.

Is MD5 still safe to use?

Only for non-security purposes such as spotting accidental corruption or generating cache keys. It is not safe for digital signatures, certificates or password storage.

Are my text and files uploaded?

No. Hashes are calculated inside your browser. Files are read into memory locally, which is why the size is limited to 100 MB.

How do I verify a downloaded file?

Choose the file here, then compare the hash with the value published by the vendor over a trusted channel. If they match exactly, the file is identical to the original.