Hash Generator

Hash Generator

Hashes update live as you type
MD5
SHA-1
SHA-256
SHA-384
SHA-512

What Is a Hash Function?

A cryptographic hash function takes any input - a word, a sentence, or an entire file - and turns it into a fixed-length string of characters called a hash (or digest). The same input always produces the exact same hash, but even a single changed character produces a completely different, unpredictable result.

Hashing is one-way: you can't reverse a hash back into the original text. That makes it useful for verifying that data hasn't been altered, fingerprinting files, and - when combined with proper salting - storing credentials without keeping the raw password.

Comparing MD5, SHA-1 & SHA-2

AlgorithmOutput LengthTypical UseCryptographically Secure?
MD5128 bits (32 hex chars)Legacy checksums, non-security dedupNo - broken, collisions are practical
SHA-1160 bits (40 hex chars)Legacy Git commit hashing, old checksumsNo - broken, collisions demonstrated
SHA-256256 bits (64 hex chars)TLS certificates, blockchain, Git (newer)Yes
SHA-384384 bits (96 hex chars)High-assurance certificates, TLSYes
SHA-512512 bits (128 hex chars)File integrity, high-security applicationsYes

"Broken" means a deliberate attacker can craft two different inputs that produce the same hash (a collision) faster than brute force - it does not mean the hash is useless for detecting accidental file corruption.

Common Uses for Hashing

File Integrity ChecksCompare a downloaded file's hash against the publisher's listed checksum to confirm it wasn't corrupted or tampered with.
Password StorageRaw hashing alone is NOT safe for passwords - real systems add a unique salt and use a slow, dedicated algorithm like bcrypt, scrypt, or Argon2 instead.
Duplicate DetectionHash file contents to quickly spot duplicate uploads or identical text blocks without comparing full content byte-by-byte.
Git Commit HashingGit identifies every commit, tree, and blob by a SHA hash of its contents, which is how it detects changes and keeps history tamper-evident.

Frequently Asked Questions

Does this tool send my text to a server?

No. Every hash is computed entirely in your browser using JavaScript (the native SubtleCrypto API for SHA algorithms, and a local MD5 implementation) - your text is never uploaded or sent to a server.

Are MD5 and SHA-1 still safe to use?

MD5 and SHA-1 are no longer considered cryptographically secure against a deliberate attacker, since practical collision attacks exist for both. They are still fine for basic integrity checks, checksums, and detecting accidental corruption, but should not be used for passwords, digital signatures, or anything security-critical - use SHA-256 or SHA-512 instead.

What's the difference between SHA-256 and SHA-512?

Both belong to the SHA-2 family and are considered cryptographically secure. SHA-256 produces a 256-bit (64 hex character) digest, while SHA-512 produces a 512-bit (128 hex character) digest. SHA-512 is often faster on 64-bit hardware and offers a larger security margin, while SHA-256 is more common in everyday applications like TLS certificates and Git.