MD5 / SHA Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes.
Hash a File
What Is Cryptographic Hashing?
A cryptographic hash function takes an input of any size and produces a fixed-size string of characters. The same input always produces the same hash, but even a tiny change in the input completely changes the output (the "avalanche effect"). Hashing is one-way — you cannot reverse a hash to recover the original input. This makes hashing essential for security applications.
MD5 — History and Security
MD5 (Message Digest 5) was designed by Ronald Rivest in 1991. It produces a 128-bit (32-character hex) hash. While MD5 was once widely used for passwords and file integrity, collision vulnerabilities discovered in 2004 make it unsuitable for security purposes. Today MD5 is still used for non-security checksums and legacy systems, but SHA-256 is the recommended alternative.
SHA Family Explained
SHA (Secure Hash Algorithm) is a family of functions designed by the NSA. SHA-1 produces 160-bit hashes but is considered weak. SHA-256 and SHA-512 (part of SHA-2) are currently the standard for security applications. SHA-256 produces 64-character hex hashes and is used in Bitcoin, SSL certificates, and password hashing. SHA-512 produces 128-character hashes for maximum security.
Use Cases
Hashing is used for file integrity verification (comparing checksums after downloads), password storage (storing hashes instead of plaintext passwords, with salt), digital signatures, data deduplication, and blockchain technology. Every Git commit is identified by a SHA-1 hash of its contents.
Hashing vs Encryption
Hashing and encryption serve different purposes. Hashing is one-way — there's no key to reverse it. Encryption is two-way — data is encrypted with a key and decrypted with a key (or the same key). Use hashing when you need to verify data without revealing it (passwords). Use encryption when you need to store data securely and retrieve it later.