What is the Hash Generator?
The Hash Generator computes cryptographic digests (MD5, SHA-1, SHA-256, and SHA-512) from text you provide. A hash is a fixed-length fingerprint of its input: the same input always produces the same digest, and any change to the input produces an entirely different one.
Hash functions are one-way. Computing a digest from data is fast, but recovering the data from a digest should be computationally infeasible. They are also deterministic and fixed-length, so a one-byte file and a one-gigabyte file both yield a SHA-256 digest of exactly 256 bits.
A small change to the input produces a completely different digest, the avalanche effect. This is what makes hashes useful for integrity checking: comparing a downloaded file's digest against a published one detects any corruption or tampering.
Not every hash function remains fit for security purposes. MD5 and SHA-1 are both broken against collision attacks, meaning an attacker can construct two different inputs with the same digest. They survive only as non-security checksums; anything involving trust should use SHA-256 or stronger.
How to use the Hash Generator
- Enter your text. Type or paste the content you want to hash into the input field.
- Pick an algorithm. SHA-256 is the sensible default. Choose MD5 or SHA-1 only when matching a legacy checksum you did not choose.
- Read the digest. The hash is displayed as a lowercase hexadecimal string of fixed length for the chosen algorithm.
- Compare against a reference. To verify integrity, compare the computed digest against the published one character by character, or paste both somewhere you can diff them.
Worked examples
Digest lengths by algorithm
Each algorithm produces a fixed-size output regardless of input length. Here is the same short input across all four.
Input: "hello"MD5 (128-bit): 5d41402abc4b2a76b9719d911017c592
SHA-1 (160-bit): aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
SHA-256 (256-bit): 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-512 (512-bit): 9b71d224bd62f3785d96d46ad3ea3d73319bfbc2890caadae2dff72519673ca7...The avalanche effect
Changing a single character changes roughly half the bits of the output, with no resemblance to the original digest.
"hello" -> 2cf24dba5fb0a30e26e83b2ac5b9e29e...
"hellp" -> 8b9a7ba0e4d6d31b2f1e5e4c9a7d3b8c...A one-letter change produces a completely
unrelated digest. This is why hashes detect
even trivial corruption.Common use cases
- Verifying downloaded files. Projects publish a SHA-256 digest alongside a release so you can confirm the file you received matches the file they shipped.
- Detecting duplicate content. Comparing digests is much cheaper than comparing large files byte by byte.
- Generating cache keys. Hashing a request's parameters produces a compact, fixed-length key for a cache entry.
- Checking data integrity after transfer. Hashing before and after a copy confirms nothing was corrupted in transit.
- Matching legacy checksums. Older systems often publish MD5 sums. Reproducing one tells you whether a file matches, even though MD5 is unsuitable for security decisions.
Features and limitations
- Supports MD5, SHA-1, SHA-256, and SHA-512.
- Runs on the Web Crypto API where available, so digests are computed by the browser's native implementation.
- Output is lowercase hexadecimal, matching the convention used by sha256sum and similar command-line tools.
- Hashing is one-way, there is no 'decode' operation, and any site offering to reverse a hash is either looking it up in a table of precomputed common inputs or guessing.
- MD5 and SHA-1 are included for compatibility with existing checksums, not because they are safe for new security work.
Frequently asked questions
Can I reverse a hash back to the original text?
No. Hash functions are one-way by construction. Services that claim to 'decrypt' a hash are looking the digest up in a precomputed table of common inputs, which works for weak passwords and fails for anything with real entropy.
Which algorithm should I use?
SHA-256 for essentially all new work. Use SHA-512 if you specifically want a longer digest. Use MD5 or SHA-1 only to match a checksum produced by a system you do not control.
Why are MD5 and SHA-1 considered broken?
Practical collision attacks exist for both, meaning an attacker can construct two distinct inputs sharing a digest. That destroys their usefulness for signatures or tamper detection, though they still function as basic error-detection checksums.
Should I use these to store passwords?
No. Plain cryptographic hashes are far too fast, which makes brute-forcing cheap. Password storage requires a deliberately slow, salted algorithm such as bcrypt, scrypt, or Argon2.
Is my input sent to a server?
No. Digests are computed in your browser, so nothing you type is transmitted.
Why does my digest differ from the command line?
Usually a trailing newline. Running echo 'text' adds one, which changes the digest; echo -n 'text' does not. Character encoding differences can also cause a mismatch.
All processing happens locally in your browser, your data never leaves your device.
