What the MD5 / SHA Hash Generator does
This page turns a string into a fixed-length hexadecimal digest. Paste text into the box, press one of the algorithm buttons, and the digest appears underneath with a line showing the algorithm name and how many hex characters it produced. Digests are computed by the browser's own cryptographic engine, so the text never leaves the machine and no account or upload is involved.
All four buttons work. SHA-1, SHA-256 and SHA-512 are computed by the browser's own WebCrypto engine, while MD5 runs through a small MD5 implementation bundled into this page, because WebCrypto deliberately leaves MD5 out of its supported set. Input is encoded as UTF-8 bytes before hashing, so accented letters and Chinese characters produce the same digest they would on a command line. Output is lowercase hex with no prefix.
How to use it
- Replace the sample inputThe box starts with the string Hello, World! so a digest can be produced immediately. Delete it and paste the exact text you need to hash; every character as typed is included.
- Press an algorithm buttonEach button hashes whatever currently sits in the text box with one algorithm. The result line beneath names the algorithm used and counts the hex characters in the digest.
- Check the digest lengthA SHA-1 digest is 40 hex characters, SHA-256 gives 64 and SHA-512 gives 128. Seeing a length outside those numbers means you are looking at output from a different algorithm than you assumed.
- Clear before reusingThe clear button empties input, digest and length line together. Doing that before each new check stops a stale digest from the previous string being read as the result for the new one.
Options and formats
Things to watch out for
Frequently asked questions
Does the MD5 button really work?
Yes. Browsers do not implement MD5 in their WebCrypto API, so this page carries its own small MD5 implementation and runs it locally in the tab. The digest matches the md5sum command line tool for the same UTF-8 bytes, and the length line under the result confirms which algorithm produced it.
Which algorithm should I use for a checksum today?
SHA-256 is the safe default: widely available, no practical collision attack, and identical output across platforms. SHA-1 remains useful only for comparing against existing legacy checksums. MD5 should be avoided for anything integrity-related, since collisions can be constructed deliberately by anyone with modest computing power.
Will my digest match one from the command line?
It will if both sides hash the same bytes. The usual culprit is a stray newline: shell echo appends one, so echo text and echo -n text give different digests. Check the length first as well, since 40 characters means SHA-1 rather than SHA-256.
Can this page hash a large file?
No. The input is a text box and its contents are encoded as UTF-8 before hashing. File verification needs a tool that streams raw bytes, such as a command-line hasher, because pasting content into a browser field risks altering whitespace, line endings or encoding on the way in.
Is the output uppercase or padded?
Lowercase, two hex characters per byte, no prefix and no separators. Length follows the algorithm: 40 characters for SHA-1, 64 for SHA-256 and 128 for SHA-512. If a site rejects your digest, check the case and the expected length before assuming the hash is wrong.
Is SHA-256 good enough for storing passwords?
No. Fast hashes are built to run quickly, which is exactly what an attacker wants when guessing passwords offline at scale. Password storage needs a deliberately slow, salted key-derivation function such as bcrypt, scrypt or Argon2. Use this page for checksums and identifiers, not credentials.