About the MD5 Generator
The MD5 Generator calculates the MD5 digest of text or a file and shows it as a 32-character hexadecimal string. SHA-1 and SHA-2 hashes are shown alongside, and you can paste an expected checksum to verify a download.
How it works
The text is converted to UTF-8 bytes and padded: a single 1 bit is added, then zeros until the length is 8 bytes short of a multiple of 64, and finally the original length in bits as a 64-bit number. The padded message is processed in 64-byte blocks.
Each block goes through 64 steps split into four rounds, each using a different bitwise function, a table of constants and a rotation. The results update four 32-bit state words, which are written out in little-endian order to form the 128-bit digest, displayed as 32 hex characters. The calculation runs in JavaScript on the page.
How to use
- 1
Type text into the box, or switch to File and drop a file.
- 2
Read the MD5 hash in the highlighted card.
- 3
Paste an expected checksum in the Verify box to check it, or click Copy.
Worked examples
Hashing a phrase
Checking a known reference value.
This is the widely published MD5 test vector for that sentence.
Hashing a short string
Creating a test fixture.
Any change to the input, even capitalizing the h, produces an unrelated hash.
Frequently asked questions
Is MD5 still considered secure?+
No. MD5 has practical collision attacks and should not be used for passwords, digital signatures or any security purpose. It is still acceptable for detecting accidental corruption or as a non-security fingerprint.
Why do file downloads sometimes show an MD5 hash?+
So you can check that the file arrived intact. If the MD5 of your download matches the published value, the file was not corrupted in transit. It does not guarantee the file was not replaced by an attacker.
How long is an MD5 hash?+
128 bits, which is written as 32 hexadecimal characters.
Can MD5 be decrypted?+
No, MD5 is a hash, not encryption. However, MD5 hashes of common words and short strings are in large lookup tables, so simple inputs can often be found by searching for the hash.
What is the MD5 of an empty string?+
d41d8cd98f00b204e9800998ecf8427e. This tool shows nothing until you type at least one character.