🔒 Processed locally in your browser — no data uploaded
← Back to Home

MD5 / SHA Hash Generator

Input text
Result

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

  1. 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.
  2. 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.
  3. 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.
  4. 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

SHA-256The sensible default for checksums. 64 hex characters, no known practical collision attack, and matching output on browsers, command lines and language runtimes everywhere.
SHA-512Same family, larger digest at 128 hex characters. Slower on 32-bit hardware but a normal choice when a policy, API or signature scheme demands a longer output.
SHA-140 hex characters. Still handy for matching old checksums and git object names, but its collision resistance is broken, so it should not back signatures or new integrity checks.
MD532 hex characters. WebCrypto does not offer MD5, so an implementation is inlined into this page instead. Useful for matching checksums produced by older tools and for confirming a download arrived intact, but not for anything security related.
ClearResets the input, the digest and the length line in one click, which is the fastest way to keep successive hash comparisons from being confused with each other.

Things to watch out for

MD5 is fine for checksums, not for securityMD5 is fast, and that speed is exactly why it should not guard anything important. Deliberate collisions can be constructed with ordinary hardware, so treat an MD5 match as evidence that a download completed, never as evidence that a file is authentic.
Trailing whitespace changes everythingA copied line usually carries a newline or a trailing space. Because the hash covers every byte, that invisible character produces a completely different digest. Compare the two inputs character by character before calling a download corrupt.
Line endings matterMulti-line text pasted from a Windows source carries carriage returns that Unix tools do not add. Two files that look identical on screen can hash differently because of that single character in the stream.
Text only, no file modeThe box hashes text typed or pasted into it, never a file's bytes. Verifying a downloaded image or ISO needs a tool that reads the file directly, since retyping or copying content can alter it.

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.