Generate MD5, SHA-1, SHA-256 or SHA-512 hashes — runs entirely in your browser.
Hash Generator — Free Online ToolWhat is a hash function?
A cryptographic hash function takes an input of any size and produces a fixed-length output called a hash (or digest). Three properties make hashes useful:
- Deterministic — the same input always produces the same hash.
- One-way — you cannot reverse a hash to recover the original input.
- Avalanche effect — changing a single character in the input produces a completely different hash.
Common uses include file integrity checks, digital signatures, password storage (with a proper algorithm), and data deduplication.
MD5 — fast but broken
MD5 (Message Digest 5) was designed in 1991 and produces a 128-bit (32-character hex) hash. It is extremely fast, which made it popular for checksums and non-security uses.
Why MD5 is broken: In 2004, researchers demonstrated practical collision attacks — two different files can be crafted to produce the same MD5 hash. This makes MD5 unsuitable for digital signatures, certificates or any security context.
When MD5 is still fine:
- Verifying accidental file corruption (where an attacker is not involved).
- Database deduplication and cache keys.
- Non-security checksums where speed matters.
SHA-1 — deprecated, avoid in new systems
SHA-1 (Secure Hash Algorithm 1) produces a 160-bit (40-character hex) hash. It was the industry standard through the 2000s but was deprecated by NIST in 2011 and has been practically broken since 2017 (the SHAttered attack produced the first real-world SHA-1 collision).
Modern browsers and certificate authorities no longer accept SHA-1 TLS certificates. Do not use SHA-1 in new software.
SHA-256 — the current standard
SHA-256 is part of the SHA-2 family and produces a 256-bit (64-character hex) hash. It is the algorithm behind Bitcoin's proof-of-work, TLS 1.3 certificates, and the majority of modern software signing.
No practical collision attack exists against SHA-256. It is the recommended choice for almost all new applications.
SHA-512 — more bits, same security level
SHA-512 produces a 512-bit (128-character hex) hash. It offers a larger security margin than SHA-256 and can be faster than SHA-256 on 64-bit systems because it operates on 64-bit words.
SHA-512 is a good choice when you want the largest hash output, such as for long-term archival integrity or high-security signing.
Quick comparison table
| Algorithm | Output | Bits | Status | Use for |
|---|---|---|---|---|
| MD5 | 32 hex chars | 128 | Broken | Non-security checksums |
| SHA-1 | 40 hex chars | 160 | Deprecated | Avoid in new systems |
| SHA-256 | 64 hex chars | 256 | Secure ✓ | Everything security-related |
| SHA-512 | 128 hex chars | 512 | Secure ✓ | High-security, 64-bit systems |
How to verify a file checksum
Software publishers often provide a checksum (usually SHA-256) alongside their downloads so you can confirm the file was not tampered with or corrupted in transit. Here's how:
- Download the file and note the expected hash published by the source.
- Open our Hash Generator, select the correct algorithm (SHA-256 is most common), and drag the file onto the tool.
- Compare the generated hash with the expected hash. If they match exactly, the file is authentic.
Even a single corrupted byte will produce a completely different hash, so any mismatch means the file should not be trusted.
Why you should never hash passwords with MD5 or SHA-256
Plain hash functions are designed to be fast. This makes them terrible for passwords: an attacker with modern GPU hardware can compute billions of MD5 hashes per second, making brute-force and dictionary attacks trivial.
For passwords, always use a password-hashing algorithm specifically designed to be slow and expensive:
- bcrypt — widely supported, configurable cost factor.
- Argon2 — winner of the Password Hashing Competition; recommended by OWASP.
- PBKDF2 — NIST-approved, used in many standards including WPA2.
Frequently asked questions
Is MD5 safe to use?
MD5 is safe for non-security tasks like file checksums and deduplication, but it is broken for cryptographic security. Known collision attacks make it unsuitable for digital signatures or password storage. Use SHA-256 for anything security-related.
What is the difference between SHA-256 and SHA-512?
Both are secure and part of the SHA-2 family. SHA-256 produces 64 hex characters; SHA-512 produces 128. SHA-512 may be faster on 64-bit hardware and offers a larger security margin, but SHA-256 is the standard for most use cases including TLS certificates.
Can a hash be reversed?
No. Hash functions are one-way — you cannot mathematically reverse them. However, an attacker can compare your hash against precomputed tables of common inputs. This is why plain hashes should never be used for passwords.
How do I verify a file checksum?
Generate the hash of your downloaded file using the same algorithm published by the source (usually SHA-256). If the hashes match exactly, the file is intact. Our free Hash Generator handles MD5, SHA-1, SHA-256 and SHA-512 directly in your browser — nothing is uploaded.
Conclusion
Use SHA-256 by default for anything security-related. Reserve MD5 for non-security checksums where speed is important and an attacker cannot manipulate the input. Never use MD5 or SHA-1 for passwords — use bcrypt or Argon2 instead. Our free Hash Generator makes it easy to compute any of the four algorithms directly in your browser.
Generate hashes instantly — no file is uploaded, everything runs locally.
Hash Generator — Try it Free