Hash Generator
Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or a file in one go.
Drag and drop a file or click to select
Hash Algorithm Guide
- MD5: 128-bit, fast but not secure (use for checksums only)
- SHA-1: 160-bit, legacy system compatibility
- SHA-256: 256-bit, current standard widely used
- SHA-512: 512-bit, for higher security requirements
A hash shrinks any data into a fixed-length hex string. SHA hashes use the browser's Web Crypto API and MD5 uses a script in the page, so neither your text nor your file is uploaded. Text is hashed as UTF-8 bytes; the MD5 of é starts with 66ddcd97.
Entering abc on the Text tab gives these values.
| Algorithm | Length | Hash of abc |
|---|---|---|
| MD5 | 32 chars | 900150983cd24fb0d6963f7d28e17f72 |
| SHA-1 | 40 chars | a9993e364706816aba3e25717850c26c9cd0d89d |
| SHA-256 | 64 chars | ba7816bf8f01cfea414140de5dae2223… |
| SHA-384 | 96 chars | 96 hex characters |
| SHA-512 | 128 chars | 128 hex characters |
A tiny change rewrites the whole hash. SHA-256 of Abc starts with 06d90109, and abc followed by a newline starts with edeaaff3. That is also why echo abc | sha256sum disagrees with the tool: echo adds a newline. printf 'abc' | sha256sum matches.
Checking a downloaded file
Drop a file on the File tab and the five values fill in when progress reaches 100%. Compare SHA-256 with the publisher's value. In a terminal, shasum -a 256 file (Mac, Linux) or certutil -hashfile file SHA256 (Windows) gives the same result. A multi-gigabyte file may fail because the file is read into memory; use the terminal.
Which algorithm to pick
SHA-256 is the default choice for new work. Real collisions exist for MD5 and SHA-1, so use them only to spot accidental corruption, never where someone could swap a file on purpose. For storing passwords even SHA-256 is too fast; use bcrypt, scrypt or Argon2. A hash cannot be reversed by calculation, but short inputs can be found in precomputed tables.