DevKit

Hash Generator

Compute MD5, SHA-1 and SHA-2 digests from text and compare them with a known checksum.

Free No sign-up Runs in your browser
Text to hash
AlgorithmDigest

MD5 and SHA-1 are shown for legacy compatibility and checksum verification only — do not use them for passwords or signatures.

What a cryptographic hash is

A hash function maps any input to a fixed-length fingerprint: MD5 and SHA-1 produce 128 and 160 bits, SHA-256 produces 256. The same input always yields the same digest, a one-character change produces a completely different one (the avalanche effect), and — for a good hash — you cannot work backwards from the digest to the input.

That makes hashes useful for integrity checks: publish the SHA-256 of a release file, and anyone can confirm their download is byte-identical to yours. The same property underlies signatures, commit ids in Git, content-addressed storage and password storage (with a slow, salted variant).

Which algorithm should you pick?

AlgorithmDigest sizeStatus
MD5128 bitBroken — collisions are trivial to produce. Legacy checksums only.
SHA-1160 bitDeprecated — practical collisions exist (SHAttered). Do not use for new signatures.
SHA-256256 bitRecommended default for integrity and signatures.
SHA-384 / SHA-512384 / 512 bitStrong; SHA-512 is often faster than SHA-256 on 64-bit hardware.

"Broken" means collision resistance fails: an attacker can craft two different files with the same MD5. That is catastrophic for signatures and certificates, but harmless if you only need a quick checksum to notice a corrupted download.

Hashes are not encryption, and plain hashing is not password storage

A hash cannot be reversed, but it can be guessed: an attacker with a stolen database simply hashes millions of candidate passwords and compares. Unsalted, fast hashes fall in seconds. Password storage needs a deliberately slow, memory-hard algorithm — Argon2id, scrypt, or bcrypt — with a unique salt per user. Never ship sha256(password).

Getting the bytes right

Hashing operates on bytes, not characters, so encoding matters. café in UTF-8 is five bytes and hashes differently from the same word in Latin-1. A trailing newline added by an editor will also change the digest — a very common cause of "the checksum does not match". This page hashes the UTF-8 encoding of exactly what you type, and MD5 is computed in pure JavaScript while SHA-1/2 use the browser's native Web Crypto implementation.

Frequently asked questions

Why do I get a different hash than another tool?
Almost always a byte-level difference: a trailing newline, Windows CRLF vs Unix LF line endings, or a different text encoding. Compare file hashes with a tool that reads raw bytes rather than pasted text.
Can I hash a file here?
Not directly — this page hashes text. For files, use your OS (sha256sum file.zip, shasum -a 256 file.zip) or a small script, since browsers would have to read the whole file into memory.
Is MD5 still okay for checksums?
For detecting accidental corruption, yes. For anything adversarial — signatures, certificates, malware scanning — no. An attacker who can modify a file can also make it collide with the published MD5.
Is the text I paste uploaded?
No. MD5 runs as JavaScript in the page and SHA-1/2 use the browser's built-in crypto module. There is no network request at all.

Related tools