How to use the md5 hash generator
- Type or paste the text you want to hash into the Text to hash field.
- Select Lowercase or Uppercase from the output case menu.
- The MD5 hash appears immediately below as you type.
- Copy the 32-character hexadecimal digest for use in your application.
How the MD5 algorithm works
MD5 processes data in 512-bit (64-byte) blocks. The message is padded so its length becomes congruent to 448 modulo 512, then the original 64-bit length is appended. Four 32-bit state variables (A, B, C, D) are initialized to fixed constants. Each block goes through 64 rounds divided into four groups of 16, using bitwise functions F, G, H, and I along with per-round constants derived from the sine function.
For example, hashing the three characters abc means padding the 24-bit input to 512 bits, running one block through all 64 rounds, and reading out the final A, B, C, D values as little-endian bytes. The result is 900150983cd24fb0d6963f7d28e17f72, which matches the test vector in RFC 1321.
RFC 1321 test vectors
RFC 1321 defines several standard inputs and their expected digests. Use these to confirm that any md5 hash generator is implemented correctly.
| Input | MD5 digest (lowercase) |
|---|---|
| (empty string) | d41d8cd98f00b204e9800998ecf8427e |
| a | 0cc175b9c0f1b6a831c399e269772661 |
| abc | 900150983cd24fb0d6963f7d28e17f72 |
| message digest | f96b697d7cb7938d525a2f31aaf161d0 |
| abcdefghijklmnopqrstuvwxyz | c3fcd3d76192e4007dfb496cca67e13b |
| A...Z a...z 0...9 | d174ab98d277d9f5a5611c2c9f419d9f |
| 1234567890 repeated 8 times | 57edf4a22be3c955ac49da2e2107b67a |
When to use MD5 and when to avoid it
MD5 remains useful for non-security checksums. It can detect accidental file corruption during transfers, serve as a cache key for identical content, or fingerprint data where speed matters more than resistance to attack. Many legacy systems still rely on it for deduplication.
However, MD5 is broken for cryptographic purposes. Researchers demonstrated practical collision attacks in 2004, meaning two different files can share the same digest. Never use MD5 for password storage, digital signatures, TLS certificates, or integrity checks where an attacker controls the input. For those tasks, use a modern alternative such as the sha256 hash generator.
Comparing MD5 with other hash functions
MD5 outputs 128 bits (32 hex characters). Other common algorithms produce longer digests that resist collisions better. The sha1 hash generator yields 160 bits but is also deprecated for security. SHA-256 produces 256 bits and is the current standard for most applications. If you need to identify what algorithm produced a given digest, a hash identifier can help based on the output length and character set.
For verifying that a downloaded file matches a known digest, a dedicated hash checker lets you compare two hashes side by side.
Technical details of the implementation
This tool implements the full MD5 algorithm in pure TypeScript without relying on external libraries or Web Crypto. The input string is encoded as UTF-8 bytes, padded according to the specification, and processed through the 64-round compression function. All arithmetic uses 32-bit unsigned integers with proper overflow wrapping via JavaScript's unsigned right shift operator. Because the computation happens locally in your browser, no data leaves your machine.
Worked examples
| Example | Input | Result |
|---|---|---|
| Empty string (RFC 1321) | Output case: lower | d41d8cd98f00b204e9800998ecf8427e |
| Single letter 'a' | Text to hash: a; Output case: lower | 0cc175b9c0f1b6a831c399e269772661 |
| Alphabet (RFC 1321) | Text to hash: abcdefghijklmnopqrstuvwxyz; Output case: upper | C3FCD3D76192E4007DFB496CCA67E13B |
| Message digest phrase | Text to hash: message digest; Output case: lower | f96b697d7cb7938d525a2f31aaf161d0 |
FAQ
Is this md5 hash generator secure for passwords?
No. MD5 is cryptographically broken and trivially fast to brute force. Never store passwords as plain MD5 digests. Use bcrypt, scrypt, or Argon2 instead.
What is the length of an MD5 hash?
An MD5 hash is always 128 bits, represented as 32 hexadecimal characters.
Can two different strings produce the same MD5 hash?
Yes. Practical collision attacks have been known since 2004, allowing attackers to craft two distinct inputs with identical MD5 digests.
Does this tool upload my text to a server?
No. The entire MD5 computation runs in your browser using JavaScript. Your input never leaves your device.
Why would I use MD5 if it is broken?
MD5 is still suitable for non-security checksums, cache keys, and data deduplication where accidental corruption detection is the goal and adversarial collisions are not a concern.
What are the RFC 1321 test vectors?
RFC 1321 lists seven standard inputs and their expected MD5 digests, including the empty string, single characters, and the full alphabet. They are used to validate implementations.
Should I use uppercase or lowercase hex output?
Both represent the same value. Lowercase is more common in Unix tools and web standards, while some Windows utilities display uppercase. Choose whichever your system expects.