Developer tools

Hash Generator: MD5, SHA-1, SHA-256

Compute MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text or file, right in your browser.

Hashing an empty string

Read locally, never uploaded. Choosing a file replaces the text above as the input.

MD5
SHA-1
SHA-256
SHA-384
SHA-512

What it is for

A hash function turns input of any size into a fixed-length fingerprint. The same input always gives the same hash, and changing a single byte changes the whole result, which is why hashes are used to verify downloads, detect duplicate files, generate cache keys and compare content without comparing the content itself. This tool computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 for text as you type, and for a file you choose, without uploading either. The SHA family is computed by the Web Crypto API built into your browser.

How to use it

  1. Type or paste text and all five hashes update as you go. The text is hashed as UTF-8 bytes, which is what nearly every language and command-line tool does too.
  2. To hash a file, choose it with the file picker. It is read locally and the hashes appear once it has been processed, with a note of its size.
  3. Click Copy beside any hash. Tick Uppercase if the system you are comparing against shows hex in capitals.

Questions

Which hash should I use?
SHA-256 for anything new. MD5 and SHA-1 are fast and still fine for checksums and cache keys, but both are broken for security purposes: attackers can craft two different inputs with the same hash. Never use either for passwords or signatures.
Can I store passwords as SHA-256?
No. Plain hashes are far too fast, so a leaked database can be brute-forced quickly. Passwords need a slow, salted algorithm such as bcrypt, scrypt or Argon2.
Why does my hash differ from the one on the command line?
Usually a trailing newline. echo adds one, so echo "abc" | md5 hashes four bytes, not three. Use printf or echo -n to compare like with like. Different text encodings or Windows line endings cause the same mismatch.
Is my file uploaded?
No. The file is read by your browser and hashed in memory. Nothing is sent to us, which also means there is no size limit beyond what your browser can hold.