Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from any text. All hashing runs in your browser — nothing is sent to any server.

Generate Cryptographic Hashes

MD5 128-bit
Enter text above to generate hash...
SHA-1 160-bit
Enter text above to generate hash...
SHA-256 256-bit
Enter text above to generate hash...
SHA-384 384-bit
Enter text above to generate hash...
SHA-512 512-bit
Enter text above to generate hash...

Hash Verification

Paste an expected hash below to verify it matches the generated hash above.

What Is a Hash Function?

A cryptographic hash function takes an input of any size (a password, a file, an entire database) and produces a fixed-size output called a "hash" or "digest." The same input always produces the same hash, but even a tiny change in the input — flipping a single bit — produces a completely different hash. This property makes hash functions essential for data integrity verification, password storage, digital signatures, and blockchain technology.

Hash functions are one-way by design: given a hash output, it should be computationally infeasible to reverse-engineer the original input. This is different from encryption, which is designed to be reversible with the correct key.

Hash Algorithms Compared

AlgorithmOutput SizeSecurity StatusSpeedRecommended For
MD5128-bit (32 hex chars)Broken — collisions foundVery fastNon-security checksums only
SHA-1160-bit (40 hex chars)Broken — collisions demonstrated in 2017FastLegacy systems only (Git still uses it)
SHA-256256-bit (64 hex chars)Secure — industry standardModerateTLS certificates, Bitcoin, code signing, general use
SHA-384384-bit (96 hex chars)SecureModerateHigh-security contexts, government systems
SHA-512512-bit (128 hex chars)SecureFast on 64-bit CPUsLarge file integrity, highest security needs
SHA-3Variable (224–512 bits)Secure — different design from SHA-2ModerateFuture-proofing, defence-in-depth alongside SHA-2

How Hash Functions Work

Hash functions process input data through a series of mathematical transformations. SHA-256, for example, breaks the input into 512-bit blocks, then applies 64 rounds of bitwise operations (AND, OR, XOR, rotation, modular addition) using different constants for each round. The result is a 256-bit hash that is extremely sensitive to input changes — this property is called the avalanche effect.

To illustrate the avalanche effect: the SHA-256 hash of "hello" is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824, while the hash of "Hello" (capital H) is 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969 — a completely different string, despite only one character changing.

Common Uses for Hash Functions

Hash Functions vs Encryption — Key Differences

PropertyHashingEncryption
DirectionOne-way (irreversible)Two-way (reversible with key)
Output SizeFixed (e.g., 256 bits)Proportional to input
Key RequiredNoYes
PurposeVerify integrityProtect confidentiality

Why MD5 and SHA-1 Are Broken

A hash function is considered "broken" when someone can find two different inputs that produce the same hash output (a collision). MD5 collisions can be generated in seconds on a modern laptop. In 2017, Google demonstrated the first practical SHA-1 collision (the "SHAttered" attack), requiring 6,500 years of CPU time and 110 years of GPU time — expensive but feasible for well-funded attackers. As a result, certificate authorities stopped issuing SHA-1 TLS certificates, and browsers reject them. For any new project, use SHA-256 or SHA-3.

Frequently Asked Questions — Hash Generator

Written and reviewed by the FreeBytes Editorial Team · Last updated: June 2026