Hash Generator (MD5, SHA-1, SHA-256, SHA-512)
Type or paste text to compute MD5, SHA-1, SHA-256, and SHA-512 hashes instantly. Everything runs locally in your browser.
How to Use the Hash Generator
Hash functions turn any piece of text into a short, fixed-length fingerprint that is practically impossible to reverse. This generator computes four of the most widely used algorithms at once, entirely inside your browser.
Enter your text. Type or paste the content you want to hash into the input area. It can be a password, a phrase, a file name, a token, or any other string.
Example: Enter "hello" to see that MD5 returns 5d41402abc4b2a76b9719d911017c592, while SHA-256 returns 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824.
Click "Generate Hashes". The tool encodes your text as UTF-8 and runs MD5 in pure JavaScript while SHA-1, SHA-256, and SHA-512 use the browser-native Web Crypto API. All four results appear at once.
Example: Change a single letter to "Hello" and every digest changes completely. This is the avalanche effect that makes hashes useful for detecting tampering.
Toggle uppercase if needed. Enable the uppercase option to convert the hexadecimal output from lower case (a-f) to upper case (A-F), which some systems and checksum files expect.
Copy the hash you need. Each algorithm has its own copy button so you can paste the exact digest into a configuration file, a database column, or a test.
Pro tip: MD5 and SHA-1 are considered broken for security purposes. Use SHA-256 or SHA-512 for signatures and integrity checks, and keep MD5 only for non-security checksums and legacy interoperability. For storing passwords, always prefer a slow key-derivation function such as bcrypt, scrypt, or Argon2.
What Is a Hash Function?
A cryptographic hash function takes an input of any length and produces an output of fixed length, called a hash or digest. The same text always produces the same digest, but two different texts almost always produce very different digests. This property, known as the avalanche effect, guarantees that a single changed character completely reshuffles the result. Hash functions are one-way: from a digest it is practically impossible to recover the original text. They are therefore used to verify file integrity, to store derived password values, to create digital signatures, and to index data in hash tables. MD5 produces 128 bits (32 hexadecimal characters), SHA-1 produces 160 bits (40 characters), SHA-256 produces 256 bits (64 characters), and SHA-512 produces 512 bits (128 characters). MD5 and SHA-1 are now vulnerable to collisions, meaning two different inputs can produce the same digest. For any security-sensitive use, prefer SHA-256 or SHA-512, and for passwords use a slow, salted key-derivation function such as bcrypt, scrypt, or Argon2 rather than a plain hash.
Common Applications
1. Integrity verification: After downloading a file, you compare its SHA-256 digest with the value published by the vendor. If the two match, the file is intact and has not been altered in transit.
2. Data comparison and deduplication: Two teams verify that database copies are identical by comparing digests instead of transferring gigabytes of content. Storage systems also use hashes to avoid keeping duplicate files.
3. Request signing and authentication: APIs frequently sign requests by hashing the message body with a secret key (HMAC-SHA-256), which lets the server verify both the origin and the integrity of the request.
4. Caching and identifiers: Developers derive deterministic cache keys, ETags, or avatar URLs (Gravatar uses the MD5 of an email address) from hashes so the same input always maps to the same identifier.
5. Testing and development: Engineers generate known reference values for unit tests, checksum fixtures, and reproducible builds, ensuring that outputs never change unexpectedly between releases.
MD5, SHA-1, SHA-256, SHA-512: What Is the Difference?
The four algorithms produce digests of different lengths and offer very different levels of security. MD5 (128 bits) and SHA-1 (160 bits) are fast but broken: practical collisions have been demonstrated, which disqualifies them for security work. SHA-256 and SHA-512 belong to the SHA-2 family and remain secure and widely recommended. An MD5 hash looks like "5d41402abc4b2a76b9719d911017c592" (32 characters), a SHA-256 digest is 64 characters long, and a SHA-512 digest is 128 characters. Choose SHA-256 by default, SHA-512 when you want extra margin, and reserve MD5 for non-sensitive checksums.
Is Hashing Reversible?
No. A hash function is designed to be one-way; it has no decryption key. The only way to "reverse" it is to hash a large number of candidate inputs and compare the results, which is a brute-force or dictionary attack. This is why passwords should never be stored with a plain SHA-256 digest: an attacker armed with precomputed tables could recover common passwords instantly. Instead, add a unique random salt per user and use a deliberately slow function such as bcrypt or Argon2, designed to make each guess expensive.
Related Utilities
Frequently Asked Questions - FAQ
Is my text sent to a server?
No. MD5 is computed in plain JavaScript and SHA-1, SHA-256, and SHA-512 use the browser Web Crypto API. Everything stays on your device and nothing is uploaded.
Can I use this tool to hash a password?
You can compute the hash, but do not store passwords with SHA-256 alone. For real password storage, use a salted, slow key-derivation function such as bcrypt, scrypt, or Argon2.
Why are MD5 and SHA-1 discouraged?
Both have known collision attacks, meaning two different inputs can produce the same digest. That makes them unsafe for signatures and integrity checks. Use SHA-256 or SHA-512 instead.
Does the uppercase option change the hash value?
No. It only changes how the hexadecimal digest is displayed, from lower case to upper case. The underlying value is identical, so comparisons still succeed.
Why does the hash change completely if I edit one character?
This is the avalanche effect. A good hash function spreads any input change across the entire output, so a one-character edit produces a digest that looks entirely unrelated to the previous one.
Last updated: