Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384, SHA-512 hashes from text or files
Compare Hashes
About This Tool
Compute MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes of text or a file directly in your browser, and compare two hashes to verify a match.
What this hash generator does
This tool calculates five common cryptographic hash digests at once: MD5, SHA-1, SHA-256, SHA-384, and SHA-512. You can hash typed text or any file from your device, and a separate comparison box tells you whether two hash strings are identical. Developers use it to verify downloads, check that two files are the same, debug API signatures, and learn how hashing behaves.
All calculations run locally. The SHA family uses your browser's built-in Web Crypto API, and MD5 is computed by a small JavaScript implementation on the page. Neither your text nor your files are uploaded.
How to use it
- Choose Text Input or File Upload using the tabs at the top.
- For text, type or paste into the box and click Generate Hashes. The text is encoded as UTF-8 before hashing.
- For a file, click the upload area and select a file. Hashing starts immediately after you pick it.
- Copy any result with the button beside it. Digests are shown in lowercase hexadecimal.
- To verify a value, paste two hashes into Compare Hashes. The check ignores letter case and surrounding spaces and reports whether they match.
Hashing is not encryption
A hash function takes input of any size and produces a fixed-length fingerprint. The same input always yields the same digest, a tiny change (even one character) produces a completely different digest, and there is no key and no way to "decrypt" a hash back into the original. Encryption, by contrast, is designed to be reversed by someone holding the right key. That is why hashes are used for integrity checks and fingerprints, while encryption is used to keep data confidential.
| Algorithm | Output size | Hex length | Status |
|---|---|---|---|
| MD5 | 128 bits | 32 | Broken for security; practical collisions exist |
| SHA-1 | 160 bits | 40 | Deprecated; collisions demonstrated in 2017 |
| SHA-256 | 256 bits | 64 | Widely used and considered secure |
| SHA-384 | 384 bits | 96 | Secure; truncated variant of SHA-512 |
| SHA-512 | 512 bits | 128 | Secure; often faster on 64-bit hardware |
MD5 and SHA-1 still work fine for non-adversarial jobs such as detecting accidental corruption or deduplicating files, but they should not be trusted where an attacker could craft a colliding input.
A note on passwords
None of the algorithms here are appropriate for storing user passwords on their own, and MD5 and SHA-1 are especially unsuitable. General-purpose hashes are designed to be fast, which lets attackers test billions of guesses per second against a leaked database. Password storage should use a deliberately slow, salted algorithm such as Argon2, bcrypt, scrypt, or PBKDF2. Use this tool for checksums and learning, not for building a login system.
Common use cases
- Verifying downloads: hash an installer or ISO and compare it with the SHA-256 checksum published by the vendor.
- Spotting changes: if two config files produce the same digest, they are byte-for-byte identical.
- Debugging: confirm that your backend produces the same digest as a known reference value.
Tips
- Whitespace matters. A trailing newline or space in your text produces a different hash, so copy input carefully.
- Very large files are read fully into memory before hashing, so multi-gigabyte files may be slow or fail on devices with limited RAM.
- Need random identifiers instead of fingerprints? Try the UUID generator. Need reversible encoding? See the Base64 encoder, which is encoding, not hashing or encryption.
FAQ
Why does my hash differ from another tool's?
Usually because the input differs slightly: an extra newline, different line endings (Windows versus Unix), or a different text encoding. This tool hashes the exact UTF-8 bytes of what is in the box.
Can a hash be reversed?
Not mathematically. Short or common inputs can be found by guessing or by lookup tables, which is another reason plain hashes are not suitable for passwords.
Which algorithm should I pick?
Use SHA-256 unless a system specifically asks for something else. It is the default choice for checksums, signatures, and most modern protocols.