Quick answer
A hash function turns any input into a short, fixed-length fingerprint: change one bit and the hash changes completely, and it cannot be run backwards. In Playxoft's hash generator, type text or drop a file to see its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once. Paste a published checksum into Verify to confirm a download is intact, or switch to HMAC to sign data with a secret key.
- MD5, SHA-1 and SHA-2 at once
- Text or file
- HMAC with a key
- Verify checksum
- Hex or Base64 output
- Files up to 1 GB
How to use the Hash Generator
- 1Type or paste text, or choose File and drop the file you want to fingerprint.
- 2Read all five hashes at once, and pick Lowercase hex, Uppercase hex or Base64 to match the format you are comparing against.
- 3To check a download, paste its published checksum into Verify a checksum. The algorithm is detected from its length and the matching row turns green.
- 4Switch Mode to HMAC and enter a Secret key to compute a keyed signature, for example to debug a webhook.
- 5Comparing with
echo text | sha256sum? Turn on Add trailing newline, because echo appends one.
What is a hash function?
A cryptographic hash function maps input of any size to a fixed-size digest. Good ones have four properties:
- Deterministic: the same bytes always give the same hash.
- Avalanche effect: changing one bit flips about half of the output bits.
- Preimage resistance: given a hash, you cannot find an input that produces it.
- Collision resistance: you cannot find two different inputs with the same hash.
Adding a single period changes the whole digest:
MD5("The quick brown fox jumps over the lazy dog") = 9e107d9d372bb6826bd81d3542a419d6
MD5("The quick brown fox jumps over the lazy dog.") = e4d909c290d0fb1ca068ffaddf22cbd0Hashes fingerprint files, deduplicate data, address content (Git, Docker image digests, IPFS) and sit underneath digital signatures and HMACs. MD5 is specified in RFC 1321; SHA-1 and the SHA-2 family in FIPS 180-4.
Which hash algorithm should I use?
For anything new, use SHA-256. Keep MD5 and SHA-1 for compatibility and accidental-corruption checks only.
| Algorithm | Digest | Hex length | Status | Use it for |
|---|---|---|---|---|
| MD5 | 128 bits | 32 | Broken: practical collisions since 2004 | Legacy checksums, cache keys |
| SHA-1 | 160 bits | 40 | Broken: SHAttered collision (2017) | Legacy systems, Git object IDs (Git still defaults to a hardened SHA-1) |
| SHA-256 | 256 bits | 64 | Secure | Checksums, signatures, HMAC, content IDs |
| SHA-384 | 384 bits | 96 | Secure | TLS suites, Subresource Integrity |
| SHA-512 | 512 bits | 128 | Secure | Large-margin integrity, Ed25519 internals |
"Broken" means an attacker can craft two different files with the same hash — enough to forge certificates (as the 2008 rogue CA demonstration did with MD5) or swap a document after it was approved. It does not mean that a random download with a matching MD5 is corrupted. SHA-384 and SHA-512/256 are truncated, which also makes them immune to length-extension attacks. SHA-3 and BLAKE3 are excellent too, but Web Crypto does not provide them, so they are not offered here.
Is MD5 or SHA-256 safe for passwords?
No — and the same goes for SHA-256 and SHA-512. General-purpose hashes are designed to be fast, and that is exactly the wrong property for passwords: an attacker who steals the table can try billions of guesses per second on GPUs, and unsalted hashes of common passwords are already in precomputed lookup tables. Those online "MD5 decrypters" are just such tables.
Store passwords with a deliberately slow, salted, memory-hard password hashing function:
- Argon2id (RFC 9106) — the first choice for new systems.
- scrypt (RFC 7914) — memory-hard, widely available.
- bcrypt — battle-tested; note it only uses the first 72 bytes of a password.
- PBKDF2 with a high iteration count — when FIPS compliance requires it.
The OWASP Password Storage Cheat Sheet lists current parameters. Use your platform's library (argon2 for Node, argon2-cffi for Python, golang.org/x/crypto/argon2 for Go, ASP.NET Core Identity's PasswordHasher (PBKDF2) for C#) rather than rolling your own.
How do I verify a file checksum?
Download the file and its published checksum (often a SHA256SUMS file next to the download), then compare. Drop the file into this tool and paste the checksum into Verify a checksum, or use the command line:
# Linux
sha256sum ubuntu.iso
sha256sum -c SHA256SUMS --ignore-missing
# macOS
shasum -a 256 ubuntu.iso
# Windows PowerShell
Get-FileHash .\ubuntu.iso -Algorithm SHA256
certutil -hashfile ubuntu.iso SHA256A match proves the file is intact — not that it is authentic. If an attacker can replace the download, they can replace a checksum on the same page too. Trust a checksum only when it comes from a separate trusted channel or is itself signed (for example a GPG-signed SHA256SUMS.gpg).
Hashes differ between tools more often because of the input than the algorithm: echo adds a trailing newline, Windows files use CRLF line endings, and Windows PowerShell 5.1 writes UTF-16 files when you redirect with >. Hash the file itself whenever you can.
What is HMAC and how is it different from a hash?
An HMAC (RFC 2104) mixes a secret key into the hash, so only someone who knows the key can produce or check the value. That is how services sign webhooks: GitHub sends X-Hub-Signature-256: sha256=<hex HMAC-SHA256 of the body>, and Stripe signs a timestamp plus the body with HMAC-SHA256.
Never build your own sha256(key + message): MD5, SHA-1 and SHA-256 are vulnerable to length-extension attacks, which let an attacker append data and compute a valid tag without the key. HMAC's nested construction prevents that. Verified test vectors are published in RFC 4231, and this tool passes them.
// Node.js
const sig = crypto.createHmac("sha256", secret).update(body).digest("hex");
const expected = Buffer.from(sig), given = Buffer.from(received);
const ok = given.length === expected.length && crypto.timingSafeEqual(expected, given);
# Python
sig = hmac.new(secret, body, hashlib.sha256).hexdigest()
hmac.compare_digest(sig, received)
// Go
mac := hmac.New(sha256.New, secret); mac.Write(body)
hmac.Equal(mac.Sum(nil), receivedBytes)
// C#
var sig = HMACSHA256.HashData(secret, body);
CryptographicOperations.FixedTimeEquals(sig, receivedBytes);Always compare signatures with a constant-time function, as above. A plain == stops at the first differing byte and leaks timing information.
Frequently asked questions
Last updated by the Playxoft engineering team.