Hash Generator

Generate cryptographic hashes (MD5, SHA-1, SHA-256, SHA-512, SHA3-256, SHA3-512) from any text. Processing done server-side with PHP.

Input Text

Frequently Asked Questions

A cryptographic hash function takes any input and produces a fixed-size output (the "digest"). It is deterministic (same input → same output), one-way (cannot reverse the hash to get input), and collision-resistant (practically impossible to find two inputs with the same hash). Hashes are used for password storage, data integrity checks, digital signatures, and checksums.
MD5 and SHA-1 are considered cryptographically broken — collisions have been demonstrated. They are still used for non-security checksums (e.g. file integrity) but should never be used for passwords or digital signatures. SHA-256 and SHA-512 (SHA-2 family) and the newer SHA-3 family remain secure for cryptographic purposes.
No — not these general-purpose hashes. Use a purpose-built password hashing algorithm like bcrypt, Argon2, or scrypt which are slow by design and include a salt to resist rainbow table attacks. See the Bcrypt Generator tool.
MD5 (128-bit output) is cryptographically broken — practical collision attacks have been demonstrated since 2004. SHA-1 (160-bit output) is also considered broken — Google demonstrated a practical collision in 2017 (SHAttered attack). SHA-256 and SHA-512 (the SHA-2 family) remain secure. SHA-3 (Keccak) is the latest standard, based on a sponge function construction. For non-security checksums, MD5 and SHA-1 remain usable since preimage resistance is still intact.
Hash functions are designed to be computationally infeasible to reverse — this property is called preimage resistance. A hash function maps an input of arbitrary length to a fixed-size output. Because the output is smaller than many possible inputs, information is inherently lost. Cryptographic hash functions add the guarantee that finding any input that produces a given hash requires brute-force effort proportional to 2n operations (where n is the output bit length).
A rainbow table is a precomputed lookup table mapping common passwords to their hash values. An attacker who obtains a database of unsalted password hashes can look up each hash and instantly recover the original password. A salt is a random value appended to each password before hashing. Because every password gets a unique salt, rainbow tables become useless. This is why modern password hashing algorithms like bcrypt, Argon2, and scrypt automatically generate and store a random salt with each hash.
A hash collision occurs when two different inputs produce the same hash output. By the pigeonhole principle, collisions must exist in any hash function (infinite inputs, finite output space), but a secure hash function should make finding collisions computationally infeasible. MD5 collisions can be generated in seconds on a modern computer. A collision attack is catastrophic for digital signatures and certificates because an attacker could get a legitimate cert signed for one document and fraudulently apply it to a different one.
File integrity verification works by computing the hash of a file and comparing it to a known-good checksum published by the file's distributor. If even a single bit in the file has changed, the hash will be completely different. Common examples: Linux distributions publish SHA-256 checksums for ISO downloads; package managers like apt and npm verify package hashes before installation. To verify: sha256sum downloaded-file.iso on Linux/macOS.
HMAC (Hash-based Message Authentication Code) combines a hash function with a secret key to produce a message authentication code. Unlike a plain hash (which anyone can compute), an HMAC can only be verified by someone who knows the secret key. HMACs verify both the integrity and authenticity of a message. They are used in JWTs, API authentication (AWS Signature, Stripe webhooks), and cookie signing. Use HMAC-SHA256 — avoid HMAC-MD5 and HMAC-SHA1 for new designs.
Encryption is reversible — if your encryption key is compromised, all stored passwords can be decrypted. Hashing is one-way — even if an attacker obtains the hash database, they cannot reverse the hashes without a brute-force attack. At login time, you hash the user's input and compare it to the stored hash — you never need to recover the original password. Use Argon2id, bcrypt, or scrypt — never SHA-256 or MD5 directly for passwords.

About This Hash Generator

This free hash generator computes cryptographic hashes for any text input using MD5, SHA-1, SHA-256, SHA-384, and SHA-512 algorithms. Enter text and instantly see the hash output for every algorithm side by side.

When to use this tool

  • Generating SHA-256 checksums to verify file integrity
  • Comparing hash outputs across different algorithms
  • Testing hash behaviour for edge cases like empty strings
  • Learning the difference between MD5, SHA-1, and SHA-256

Related Articles

In-depth guides and technical articles.

View all →
SHA-256 Is Wrong for Passwords and bcrypt Is Wrong for File Integrity — Why Hash Function Choice Depends on Context
Hash functions serve four completely different contexts — data integrity, password storage, digital signatures, and hash tables — and each requires different properties. SHA-256 is ideal for integrity checks but catastrophically wrong for passwords (too fast); bcrypt is ideal for passwords but terrible for integrity checks (too slow). Here's why, plus SHA-2's length-extension vulnerability, BLAKE3's advantages, and the hash table DoS attack that made Python randomise its hash seeds.
SHA-3 Exists Alongside SHA-2, Not Instead of It — The Architecture, Length Extension Vulnerability, and 2024 Usage Guide
SHA-3 was developed alongside SHA-2 — not because SHA-2 was broken, but as a precautionary hedge using a completely different design. SHA-2 uses Merkle-Damgård construction; SHA-3 uses a sponge construction. Here's the architectural difference, why Merkle-Damgård is vulnerable to length extension attacks (and how HMAC fixes it), why SHA-3 is immune to this by design, and a 2024 guide to which hash function to use for what purpose.
What Developers Still Get Wrong About Password Storage in 2024
LinkedIn stored 117 million passwords as unsalted SHA-1 — cracked within days. Adobe used 3DES encryption (reversible) instead of hashing. These are the specific, named password storage mistakes that keep producing data breaches. Here's every common error, why it fails, and the correct modern approach with bcrypt and Argon2.
How File Hash Verification Actually Works: Determinism, the Avalanche Effect, and What "Match" Really Means
Hashing the same file twice, a year apart, on different computers, produces the exact same hash — this single property, determinism, is the foundation of file-integrity verification. Here's how the avalanche effect guarantees "match or no match, with no partial credit," why fixed output size makes hash comparison practical for huge files, the proper download-verification workflow, and why where a published hash comes from matters as much as the comparison itself.
Merkle Trees and Hash Functions: How Git, Blockchain, and Certificate Transparency Work
Hash functions underpin Git commits, blockchain blocks, and certificate transparency logs through Merkle trees. Here's why MD5 and SHA-1 are "broken," how Merkle trees verify large datasets with O(log n) hashes, and how Bitcoin light clients verify transactions without the full blockchain.