Hash Generator

Hash any text, five ways at once

Type or paste text and all five digests appear together: MD5, SHA-1, SHA-256, SHA-384 and SHA-512. They are shown side by side rather than behind a picker because the usual reason to be here is comparing a value against a checksum published somewhere else — and the page that published it does not always say which algorithm it used.

Everything runs in your browser. Nothing is uploaded, stored or logged, and the text is deliberately never written into the page address, since hashing is frequently the first thing done to something sensitive.

What a hash is

A hash function takes input of any size and returns a fixed-length value — a digest. Three properties make it useful:

Deterministic. The same input always produces the same digest, on any machine, forever.

One-way. There is no computation that turns a digest back into the input.

Avalanche. Changing one bit of the input changes about half the bits of the output, so similar inputs produce completely unrelated digests.

Together these let you compare things without moving them. A 4 GB download and its published SHA-256 can be checked against each other with 64 characters of text.

Why MD5 and SHA-1 are marked

Both are broken, and it is worth being precise about what that means, because the phrase gets used loosely.

Neither has been reversed. What has been broken is collision resistance: it is now practical to deliberately construct two different inputs that produce the same digest. MD5 collisions take seconds on a laptop. SHA-1 collisions were demonstrated in 2017 and have only become cheaper since.

The consequence is specific. A matching MD5 no longer proves two files are the same file, because someone who controls both could have made them collide on purpose. So MD5 and SHA-1 cannot back a signature, a certificate, or any claim about who produced something.

What they still do perfectly well is detect accidental change. A truncated download, a flipped bit on a disk, a file corrupted in transfer — none of those are adversarial, and none will land on a matching digest by chance. That is why MD5 checksums are still published beside downloads, and why they are still worth checking.

“Irreversible” is not the same as “safe”

No computation turns a digest back into its input. That guarantee is real, and it is routinely overestimated.

Because hashing is deterministic, the same input always gives the same digest — so an attacker does not need to reverse anything. They hash every likely input in advance and look yours up. Precomputed tables of common passwords and their digests are freely available, and “password123” has been in all of them for twenty years.

This is why password storage does not use a plain hash. It uses bcrypt, scrypt or Argon2: algorithms that are deliberately slow, and that mix a unique random salt into each password so that identical passwords produce different stored values and no precomputed table applies. A general-purpose hash is fast by design, and speed is precisely what helps an attacker guessing in bulk.

Choosing an algorithm

SHA-256 is the default answer. Fast, universally supported, no known weaknesses.

SHA-384 and SHA-512 produce longer digests. For most purposes they are not meaningfully more secure than SHA-256, though SHA-512 is often faster on 64-bit hardware because it works in 64-bit words.

MD5 and SHA-1 only to match a checksum someone else has already published, or to work with a legacy system that requires them. Never for anything new.

Digest lengths, in hexadecimal characters: MD5 is 32, SHA-1 is 40, SHA-256 is 64, SHA-384 is 96, SHA-512 is 128. The length is a quick way to identify an unlabeled checksum.

Checking a download

This tool hashes text, not files, so it is best suited to verifying short values and strings. To check a downloaded file, hash it with your operating system’s own tool and compare the result with the published digest:

macOS and Linux: shasum -a 256 filename

Windows PowerShell: Get-FileHash filename -Algorithm SHA256

Compare the whole string, not just the first few characters. And note what the comparison actually proves: that the file matches what the publisher’s page said. If an attacker controls that page, they control the checksum too — which is why security-critical downloads are signed rather than merely hashed.

Encoding matters

A hash is computed over bytes, not characters, so the digest of a string depends on how that string is turned into bytes. This tool uses UTF-8, which is the near-universal default.

If a digest computed elsewhere does not match, this is a common cause: a system using UTF-16 or a legacy code page produces different bytes for the same visible text, and therefore a completely different digest. Trailing newlines are another frequent culprit — a file ending in a line break hashes differently from the same text without one.

Frequently asked questions

What is a hash?

A fixed-length fingerprint of some data. The same input always produces the same digest, any change to the input produces a completely different one, and the digest cannot be turned back into the original. That combination is what makes hashes useful for comparing things without transmitting them.

Why are MD5 and SHA-1 marked "not for security"?

Both are broken in a specific way: it is now practical to construct two different inputs with the same digest. So a matching MD5 or SHA-1 no longer proves two files are identical, and neither proves who produced a file. Both still detect accidental corruption perfectly well, which is what a download checksum is for.

Can a hash be reversed?

Not by computation — but that is a weaker guarantee than it sounds. Common inputs like passwords are trivially recovered by looking the digest up in a precomputed table, because the same password always hashes to the same value. This is exactly why password storage uses a slow, salted algorithm such as bcrypt or Argon2 rather than a plain hash.

Should I use this to hash passwords?

No. A general-purpose hash is designed to be fast, which is the opposite of what password storage needs — speed helps an attacker try billions of guesses. Use bcrypt, scrypt or Argon2, which are deliberately slow and salt each password individually.

Which algorithm should I choose?

SHA-256 unless something specific requires otherwise. It is fast, widely supported and has no known weaknesses. SHA-512 is not meaningfully more secure for most purposes, though it is often faster on 64-bit hardware. Use MD5 or SHA-1 only to match a checksum someone else has already published.

Why does one different character change the whole digest?

By design — it is called the avalanche effect. Flipping a single bit of input should change roughly half the bits of output, so that similar inputs give unrelated digests. It is also why a digest cannot tell you how two files differ, only that they do.

Is my text uploaded?

No. All five digests are computed in your browser, and the text is deliberately never put in the page address — hashing is often the first thing done to something sensitive.