Hash Generator
The Hash Generator is an offline utility that computes cryptographic digests — MD5, SHA-1, and SHA-256 — from any text you type, side by side and in real time. A hash is a fixed-size fingerprint of the input: the same text always produces the same digest, and any change produces a completely different one.
How to Use
- 1
Type or paste your text. Hashing starts as you type — there is no submit button. The input is hashed as UTF-8, so the same text always produces the same digest on any machine.
- 2
Read all algorithms at once. MD5, SHA-1, and SHA-256 digests appear stacked and labelled with their bit lengths, so you can compare them without switching pages or retyping.
- 3
Click any digest to copy it. The full hexadecimal string goes to your clipboard — ready to paste into a checksum comparison, a test assertion, or a config file.
- 4
Read all three digests at once — they are stacked in one list, there is no side-by-side view. Download pages, APIs, and legacy systems publish checksums in different algorithms; seeing all three together tells you which one matches without guessing.
- 5
Verify a published checksum. Hash the same text here, then compare character by character with the published digest. A single differing character means the content is different — see the troubleshooting tips in the guide below if they don't match. (Files cannot be hashed here; use sha256sum, shasum, or certutil for files.)
Frequently Asked Questions
What is a hash, exactly?
MD5 vs SHA-1 vs SHA-256 — which should I use?
Can a hash be reversed or decoded?
Why does changing one character change the whole hash?
Why does the same input always give the same hash?
Why doesn't my hash match the published checksum?
Are hashes safe for storing passwords?
What is a salt?
What is HMAC, and how is it different from a plain hash?
What is a hash collision?
Generative Answer & AI Documentation
What is the Hash Generator?
The Hash Generator is an offline utility that computes cryptographic digests — MD5, SHA-1, and SHA-256 — from any text you type, side by side and in real time. A hash (digest) is a fixed-size fingerprint of the input: the same text always produces the same digest, any change to the text produces a completely different one, and the original text cannot be recovered from the digest. All computation runs locally with a JavaScript crypto library (CryptoJS), so nothing you type ever leaves your machine.
Why use Hash Generator offline?
People hash sensitive things: passwords while testing, API payloads while debugging signatures, internal documents while building checksums. Sending that input to a server-side hashing tool hands the plaintext to a third party — and if the input was a password, the tool now has both the password and its hash. Computing locally keeps the input on your machine. (And a reminder: this tool hashes text for checksums and comparison — it is not a password-storage tool. Passwords need Argon2 or bcrypt, not a fast hash.)
When should you use this tool?
Use it to compare a published checksum against text you paste, to compare algorithms when a spec doesn't say which digest it expects, to generate a deterministic identifier from a string (a cache key, an ETag, a Gravatar hash), to check whether two texts are identical without sharing them, or to learn how digest length and output change across algorithms. For hashing files rather than typed text, use your OS checksum tool (commands below) — this page hashes the text you type.
Key Benefits
- 100% private: hashing runs in browser memory with a local crypto library; input never uploaded or logged.
- All algorithms at once: MD5, SHA-1, and SHA-256 side by side — no page switching, no retyping.
- Instant: digests update as you type, with bit lengths labelled.
- Click to copy: any digest copies in one click, ready for comparison.
- Honest about limits: MD5 and SHA-1 are included for compatibility and legacy checksums — the page says plainly where they must not be used.
Common Use Cases
- Verifying text checksums: hash pasted text and compare it against a published digest character by character. (To verify a downloaded file, hash the file with sha256sum, shasum, or certutil — this tool hashes typed text only.)
- Matching legacy checksums: older download pages and systems still publish MD5 or SHA-1 — compute the same algorithm and compare.
- Git object IDs: git identifies commits and blobs by SHA-1; knowing the digest helps when reading git log or debugging object lookups.
- Gravatar hashes: Gravatar identifies avatars by the MD5 of the lowercased, trimmed email address.
- Cache keys and ETags: hash a resource's content to build a stable, collision-resistant cache key or ETag.
- API request signing: verify a signature by recomputing the expected digest (for real signing, use HMAC — see below).
Developer Notes & Best Practices
Algorithm comparison: Verifying a download checksum — hash the file on your machine and compare with the publisher's value: # macOS / Linux shasum -a 256 installer.dmg sha256sum installer.tar.gz # Windows (PowerShell) certutil -hashfile installer.exe SHA256 A match means the file is byte-identical to the publisher's. A mismatch means it was altered or corrupted in transit — do not run it. The avalanche effect, demonstrated. One capital letter changes every part of the digest: SHA-256("hello") = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 SHA-256("Hello") = 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 Password hashing — the rule. Fast hashes (MD5/SHA-1/SHA-256) are for integrity, not passwords. Store passwords with Argon2id, bcrypt, or scrypt, with a unique random salt per password (the library handles the salt). If you inherit a system storing plain SHA-256 password hashes, treat it as a security bug: migrate users to a proper password hash on next login. HMAC for signatures. When an API asks you to sign a request, the construction is HMAC-SHA256(secret_key, message) — use your language's built-in HMAC (crypto.createHmac in Node, hmac in Python, hash_hmac in PHP). Never invent sha256(key + message) yourself. Encoding matters. A hash is computed over bytes, not characters. This tool hashes UTF-8 bytes; make sure the other side does the same, or identical-looking text will produce different digests.
Algorithm comparison
| Algorithm | Digest | Hex length | Status | Use for |
|---|---|---|---|---|
| MD5 | 128-bit | 32 chars | Broken (collisions trivial since 2004) | Legacy checksums, Gravatar, non-security fingerprints only |
| SHA-1 | 160-bit | 40 chars | Broken (SHAttered collision, 2017) | Git object IDs, legacy checksums only |
| SHA-256 | 256-bit | 64 chars | Secure, current standard | Download verification, signatures, certificates, content addressing |
- Never treat Base64 as security — it only changes representation, it does not hide anything.
- Do not use MD5 or SHA-1 for password storage; use a purpose-built password hash (bcrypt, argon2) with a salt.
- Check a token's expiry before trusting its claims — decoding is not verification.
Common Mistakes
- Hashing passwords with MD5, SHA-1, or SHA-256. Fast hashes are brute-forceable by the billions per second. Use Argon2id or bcrypt.
- Hashing with a trailing newline. echo "hello" hashes hello\n. Use printf '%s' "hello" or echo -n when comparing against a published digest.
- Comparing digests with different case or whitespace. Hex is conventionally lowercase; trim spaces and compare case-insensitively.
- Trusting MD5 or SHA-1 for security. They are fine for checksums and legacy matching; they are not fine for signatures, certificates, or anything adversarial.
- Thinking a hash is encryption. A hash cannot be decrypted — but a weak input can be guessed. Hashing is not a way to store secrets.
- Hashing the text instead of the file. A file's bytes include its final newline, its BOM, and its line endings — the digest of the text alone will not match the digest of the file.
Limitations
This tool hashes the text you type; it does not read files from your disk (use shasum, sha256sum, or certutil for files). Hashes are one-way: there is no way to recover input from a digest, and this tool cannot "decode" one. MD5 and SHA-1 are included for compatibility with legacy checksums — their presence here is not an endorsement for security use. Digest comparisons are exact: even one byte of difference (a newline, a BOM, a different encoding) produces a completely different digest.
Structured Input/Output Example
hello
MD5 5d41402abc4b2a76b9719d911017c592
SHA-1 aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
SHA-256 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-256("Hello") = 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969Related Tools
MD5 Generator
MD5 generator: compute MD5 checksums — 128-bit digests as 32-character hex — from any text or file instantly. Match published checksums or Gravatar hashes.
SHA-1 Generator
SHA-1 generator: compute SHA-1 digests — 160-bit hashes as 40-character hex — from any text or file, instantly and offline. Match legacy checksums.
SHA-256 Generator
SHA-256 generator: compute SHA-256 hashes — 256-bit digests as 64-character hex — from any text. The standard for download verification and signing.