Generate cryptographic hashes from any text or file. MD5, SHA-1, SHA-256, SHA-384, SHA-512. Verify file integrity and generate checksums.
—
—
—
—
—
—
A hash function takes any input — text, a file, a password — and produces a fixed-length string of characters unique to that exact input; changing even a single character in the input produces a completely different hash, making hashes useful for verifying that data hasn’t been altered.
MD5 is fast but cryptographically broken — collisions (two different inputs producing the same hash) have been demonstrated, so it should never be used for security purposes, only for basic checksums. SHA-256 and SHA-512 are part of the more modern SHA-2 family and remain considered secure for password hashing, digital signatures, and integrity verification, with SHA-512 producing a longer hash at a small performance cost.
Hashes are used to verify a downloaded file hasn’t been corrupted or tampered with (comparing the published hash against the one you generate), to store passwords without keeping the actual password in a database, and to create unique identifiers for data without exposing the original content.
A hash function turns any input, whether a word, a file or a whole disk image, into a fixed-length fingerprint. The same input always gives the same hash, the smallest change gives a completely different one, and you cannot work backwards from the hash to the input. That makes hashes the standard way to check that data has not changed.
General-purpose hashes are built to be fast, which is exactly wrong for passwords: a modern graphics card can try billions of SHA-256 guesses per second. Store passwords with a slow, salted algorithm such as bcrypt or Argon2 instead; see the bcrypt generator. Hashing also does not hide short or predictable data. The SHA-256 of a phone number or email address can be reversed simply by hashing every possible value.
To hash a file on your own computer: sha256sum file on Linux, shasum -a 256 file on macOS, or certutil -hashfile file SHA256 on Windows.