Hash
Hash functions map arbitrary-length input to a fixed-size output (digest), forming the foundation of cryptography and data integrity verification. SHA-256 for API signing and blockchain, MD5 for file checksums, SHA-512 for password hashing — different scenarios demand different algorithms. This tool computes five hash algorithms locally in your browser; your data never leaves your device.
Supports MD5, SHA-1, SHA-256, SHA-384, SHA-512 with real-time computation and uppercase/lowercase toggle. Note: MD5 and SHA-1 have known collision vulnerabilities and should not be used for security purposes. For password storage, use bcrypt/argon2 rather than raw hashes.
📖 Hash Calculator Guide
What Is a Hash Function?
A hash function is a mathematical algorithm that maps arbitrary-length input to a fixed-length output (called a digest, hash value, or fingerprint). Key properties: deterministic (same input → same output every time), one-way (cannot reverse a hash back to its input), and avalanche effect (changing one input bit changes ~50% of output bits). These properties make hashes the foundation of data integrity verification.Algorithm Comparison
- MD5 (128-bit): 32 hex chars. Fast but broken — collision attacks exist. Do not use for security. Still common for file checksums.
- SHA-1 (160-bit): 40 hex chars. First practical collision found by Google in 2017 (SHAttered). Git still uses it for object IDs but is migrating to SHA-256.
- SHA-256 (256-bit): 64 hex chars. The workhorse of SHA-2. Used in Bitcoin mining, TLS certificates, and API signing (HMAC-SHA256). Currently considered secure.
- SHA-384 (384-bit): 96 hex chars. Truncated variant of SHA-512. Faster than SHA-512 on some platforms.
- SHA-512 (512-bit): 128 hex chars. Longest output, highest security margin. Actually faster than SHA-256 on 64-bit CPUs.
⚠️ Security Note
MD5 and SHA-1 are broken — do not use for any security purpose. For password storage, never use raw SHA hashes. Use bcrypt, scrypt, or Argon2 — purpose-built password hashing algorithms with built-in salting and iteration. SHA-256 is appropriate for API signing, file integrity, and certificate verification — but not password storage.
Command-Line Alternatives
# Linux/macOS
sha256sum file.txt
echo -n "hello" | sha256sum
md5sum file.txt
# macOS specific
shasum -a 256 file.txt
md5 file.txt