- Overview
- Converters
- Hash Generator
Hash Generator — MD5, SHA-256 & SHA-512 Hash Calculator
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes for any text or file. All hashing is performed locally in your browser using the Web Crypto API — no data is ever sent to a server. Compare hash values to verify file integrity and detect tampering.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes for text or files. All processing happens in your browser.
Frequently Asked Questions
What is a hash function?
A hash function is a mathematical algorithm that takes an input of any size and produces a fixed-size output called a hash, digest, or checksum. The same input always produces the same hash, and even a tiny change in the input creates a completely different output. Hash functions are one-way — you cannot reverse the hash to recover the original data.
What is the difference between MD5 and SHA-256?
MD5 produces a 128-bit (32-character hex) hash and is significantly faster, but it is cryptographically broken — researchers have demonstrated practical collision attacks since 2004. SHA-256 produces a 256-bit (64-character hex) hash and is part of the SHA-2 family designed by the NSA. SHA-256 has no known practical attacks and is the recommended standard for security applications including TLS certificates and blockchain.
Is MD5 still secure?
No. MD5 is cryptographically broken and should not be used for security purposes such as digital signatures, certificate validation, or password hashing. Collision attacks can be performed in seconds on modern hardware. However, MD5 is still acceptable for non-security uses like basic file checksums and data deduplication where malicious tampering is not a concern.
How do I verify file integrity with a hash?
Download the file and the hash value published by the source (often a SHA-256 checksum). Use this tool's File Upload tab to generate the hash of your downloaded file. Compare the generated hash with the published hash — if they match exactly, the file is intact and was not corrupted or tampered with during transfer.
What are rainbow tables?
Rainbow tables are precomputed lookup tables that map hash values back to their original inputs. Attackers use them to crack password hashes by looking up the hash in the table instead of brute-forcing every possibility. Rainbow tables are effective against unsalted hashes, which is why modern password storage always uses salting (adding random data before hashing) to defeat rainbow table attacks.
What is a salt in hashing?
A salt is a random value added to the input before hashing. Each password gets a unique salt, so even if two users have the same password, their stored hashes will be different. Salting prevents rainbow table attacks and makes precomputation infeasible. The salt is stored alongside the hash — it does not need to be secret, only unique per password.
Why use bcrypt or Argon2 instead of SHA-256 for passwords?
SHA-256 is designed to be fast, which is a disadvantage for password hashing — attackers can try billions of guesses per second. Bcrypt, scrypt, and Argon2 are purpose-built password hashing functions that are intentionally slow and memory-intensive. They include a configurable work factor that can be increased over time as hardware improves, making brute-force attacks impractical.
Can two different inputs produce the same hash?
Theoretically yes — this is called a collision. Since hash functions map infinite possible inputs to a finite output space, collisions must exist. However, for secure hash functions like SHA-256, finding a collision is computationally infeasible (would take billions of years with current technology). For broken algorithms like MD5, collisions can be found in seconds.
Does any data leave my browser when using this tool?
No. All hash computation happens entirely in your browser using the Web Crypto API and JavaScript. Your text and files are never uploaded to any server. You can verify this by using the tool with your network connection disabled — it will work identically.
What is SHA-512 used for?
SHA-512 produces a 512-bit (128-character hex) hash and is part of the SHA-2 family. It is used in high-security applications, digital signatures, certificate authorities, and as a building block in protocols like TLS 1.3. SHA-512 is actually faster than SHA-256 on 64-bit processors because its algorithm naturally operates on 64-bit words. It is also the basis for SHA-512/256, used in some cryptocurrency implementations.
About Hash Functions
A cryptographic hash function takes an input (or "message") of any size and produces a fixed-size output called a hash, digest, or checksum. The same input always produces the same hash, but even a tiny change in the input produces a completely different output. Hash functions are one-way: you cannot reverse a hash to recover the original input. These properties make hashing essential for data integrity verification, password storage, digital signatures, and many other security applications.
How Cryptographic Hashing Works
A hash function processes input data through a series of mathematical operations — bitwise rotations, modular additions, and logical functions — applied over multiple rounds. The input is first padded to a fixed block size, then each block is processed sequentially, updating an internal state. After all blocks are processed, the final internal state is output as the hash value. The key properties of a good cryptographic hash are:
- Deterministic — The same input always produces the same hash
- Fast computation — Computing the hash of any input is quick
- Pre-image resistance — Given a hash, it is computationally infeasible to find the original input
- Collision resistance — It is computationally infeasible to find two different inputs that produce the same hash
- Avalanche effect — A small change in input produces a drastically different hash output
Hash Algorithm Comparison
The following table compares the five hash algorithms supported by this tool:
| Algorithm | Output Size | Security Status | Speed | Primary Use Case |
|---|---|---|---|---|
| MD5 | 128 bits (32 hex) | Broken | Very fast | Legacy checksums only |
| SHA-1 | 160 bits (40 hex) | Deprecated | Fast | Legacy systems, Git (transitioning) |
| SHA-256 | 256 bits (64 hex) | Secure | Moderate | TLS certificates, blockchain, general use |
| SHA-384 | 384 bits (96 hex) | Secure | Moderate | Government and high-security applications |
| SHA-512 | 512 bits (128 hex) | Secure | Fast on 64-bit | Maximum security, large data integrity |
MD5 Deprecation Warning
MD5 was designed by Ronald Rivest in 1991 and was widely used for decades. However, in 2004 researchers demonstrated practical collision attacks, and by 2008 MD5 was used to forge a rogue SSL certificate. MD5 is now considered cryptographically broken and should not be used for security purposes. It remains included in this tool because MD5 checksums are still commonly encountered for non-security file integrity checks, legacy system compatibility, and data deduplication. For any security-sensitive application, use SHA-256 or SHA-512 instead.
Common Use Cases
- File Integrity Verification — Download a file and compare its hash to the one published by the source to ensure the file was not corrupted or tampered with during transfer
- Password Storage — Passwords are never stored in plain text. Instead, their hashes (with salt) are stored, and during login the entered password is hashed and compared. Modern systems use specialized algorithms like bcrypt or Argon2 built on top of hash functions
- Digital Signatures — A document is hashed and the hash is encrypted with a private key to create a digital signature. The recipient can verify authenticity by decrypting with the public key and comparing the hash
- Blockchain and Cryptocurrency — Bitcoin and other blockchains use SHA-256 extensively. Each block contains the hash of the previous block, creating an immutable chain. Mining involves finding input values that produce hashes below a target threshold
- Data Deduplication — Hash values can quickly identify duplicate files or data blocks without comparing the actual content byte by byte
- Content Addressing — Systems like Git, IPFS, and Docker use hashes as unique identifiers for content, ensuring that the same data always resolves to the same address
Related Tools
- Caesar Cipher — Explore classical substitution ciphers and learn about the foundations of cryptography
- Base64 Encoder & Decoder — Encode and decode data in Base64 format for safe transmission over text-based protocols