Hash Generator

Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from any text. SHA hashes use the Web Crypto API; MD5 is computed with a built-in JavaScript implementation. All processing is local.

How to Use the Hash Generator

Type or paste any text into the input field and click "Generate All Hashes". The tool will compute four different hash values simultaneously — MD5, SHA-1, SHA-256, and SHA-512 — and display them in separate output fields. Each hash has its own "Copy" button so you can quickly copy whichever algorithm's output you need. Click "Clear" to reset the input and all hash outputs.

What Is a Hash Function?

A cryptographic hash function is a mathematical algorithm that takes an input of any size and produces a fixed-length output called a hash, digest, or checksum. Hash functions have several key properties: they are deterministic (the same input always produces the same hash), they produce vastly different outputs for even tiny changes in input (the avalanche effect), and they are one-way — it's computationally infeasible to reverse-engineer the original input from a hash. These properties make hash functions essential building blocks in software engineering, security, and data integrity verification.

Hash Algorithms Compared

MD5 produces a 128-bit (32 hex character) hash. Designed in 1991 by Ronald Rivest, MD5 was widely used for checksums and data verification. However, collision attacks were demonstrated in 2004, meaning two different inputs can produce the same hash. MD5 should not be used for security purposes but remains useful for non-security checksums like verifying file downloads or generating cache keys.

SHA-1 produces a 160-bit (40 hex character) hash. Designed by the NSA and published in 1995, SHA-1 was the standard for digital signatures and certificates for over a decade. In 2017, Google demonstrated a practical collision attack (SHAttered), and SHA-1 has since been deprecated for cryptographic use. Git uses SHA-1 for commit hashes but is transitioning to SHA-256.

SHA-256 and SHA-512 are members of the SHA-2 family, producing 256-bit (64 hex) and 512-bit (128 hex) hashes respectively. They remain secure with no known practical attacks and are the current standard for digital signatures, TLS certificates, blockchain (Bitcoin uses SHA-256), password hashing (as part of algorithms like bcrypt/scrypt), and data integrity verification.

Common Use Cases

Hash functions are used throughout software development. Data integrity: When downloading software, you can compare the file's hash against the published checksum to verify nothing was corrupted or tampered with during transfer. Password storage: Responsible applications never store passwords in plain text — they store salted hashes so that even if the database is breached, the original passwords cannot be recovered. Digital signatures: TLS/SSL certificates, code signing, and document signing all hash the content before encrypting the hash with a private key. Deduplication: Storage systems and version control tools use hashes to identify identical content without comparing entire files byte by byte. Caching: Web servers and CDNs use content hashes (ETags) to determine if cached responses are still valid.