Hash Generator
Free online hash generator for MD5, SHA-1, SHA-256, and SHA-512, hash text or files directly in your browser. Includes HMAC signing, all-algorithms-at-once view, uppercase toggle, and a verify mode to confirm checksums. Uses Web Crypto API, no data leaves your device.
How the Hash Generator Works
A hash function is a one-way algorithm that turns any input, text or file, into a fixed-length string of hex characters called a hash (or digest). The same input always produces the same hash, and changing even one character produces a completely different result.
Text hashing
Type or paste any text in the input field. The hash is computed in real time (debounced 50 ms) using the browser's built-in crypto.subtle.digest for SHA algorithms and a client-side JS library for MD5. No button press required.
File hashing
Switch to File mode and drag-and-drop any file. The browser reads it as an ArrayBuffer, the raw bytes are hashed directly, so binary files (images, executables, archives) produce the same result as native tools like sha256sum. No size limit beyond available browser memory.
Verify mode
After generating a hash, paste any expected checksum into the Verify field. The tool performs a case-insensitive comparison and immediately shows a green MATCH or red NO MATCH badge, useful for confirming ISO images, software downloads, or API response integrity.
HMAC signing
Enable HMAC mode and enter a secret key to produce a keyed hash. The tool uses crypto.subtle.importKey + crypto.subtle.sign with the selected SHA algorithm. HMAC-SHA256 is the most widely supported variant for API authentication.
Supported Hash Algorithms
MD5, 128-bit / 32 hex chars
Fast but cryptographically broken since 2004. Acceptable for non-security checksums and legacy systems. Do not use for passwords or digital signatures.
SHA-1, 160-bit / 40 hex chars
Deprecated by NIST starting in 2011; collision attacks demonstrated in 2017 (SHAttered). Use only for legacy protocol compatibility such as older Git objects.
SHA-256, 256-bit / 64 hex chars
Current industry standard. Used in TLS 1.3, Bitcoin, AWS Signature V4, code signing certificates, and most modern security protocols. Recommended for new work.
SHA-512, 512-bit / 128 hex chars
Larger output; faster than SHA-256 on 64-bit CPUs due to 64-bit word operations. Ideal for high-security applications, long-term archiving, and situations where collision resistance headroom matters.
Common Use Cases
Security Best Practices
Password storage: Never store raw MD5, SHA-1, or SHA-256 hashes of passwords. Use a purpose-built password hashing function instead:
- bcrypt, widely supported, adaptive cost factor, good default choice
- Argon2id, winner of the 2015 Password Hashing Competition; best current choice
- scrypt, memory-hard; good for environments where Argon2 is unavailable
Checksum verification: Always obtain expected hashes over HTTPS from the same source as the file to prevent man-in-the-middle substitution.
The avalanche effect: why one letter changes everything
A good hash function is designed so that changing a single bit of input flips roughly half the output bits, with no visible pattern connecting the two results. Try it yourself in the tool above: hashinghelloandHellowith SHA-256, a single capitalized letter, produces two completely unrelated 64-character outputs:
SHA-256("hello")
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824SHA-256("Hello")
185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
This is exactly why hashes work as tamper detectors: there is no way to predict how a change to the input will alter the output, so any modification, even swapping one character, is immediately visible when the hash no longer matches.
Frequently Asked Questions
What is a hash function?▾
What is the difference between MD5, SHA-1, SHA-256, and SHA-512?▾
How do I use the verify / compare mode?▾
What is HMAC and when should I use it?▾
Can I hash files without uploading them?▾
Can I reverse a hash to get the original text?▾
What does "show all algorithms at once" do?▾
Which hash algorithm should I use for my project?▾
Why does the same password produce a different hash each time on real websites?▾
Are my inputs and files private?▾
By Toolember · Updated September 2026