Developer
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
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 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.