Skip to content

Hash Generator

Generate MD5, SHA-1 and SHA-256 hashes of any text instantly in your browser.

Runs in your browserFree, no sign-up

Settings

Results update automatically as you type.

MD5

5eb63bbbe01eeed093cb22bb8f5acdc3

SHA-1

2aae6c35c94fcfb415dbe95f408b9ce91ee846ed

SHA-256

b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

Security note. MD5 and SHA-1 are broken for security purposes and should only be used for checksums or legacy compatibility. Use SHA-256 or better for anything security related, and a dedicated algorithm such as bcrypt or Argon2 for passwords.

About the Hash Generator

This hash generator produces MD5, SHA-1 and SHA-256 digests of whatever text you type, computing all three at once so you can compare a checksum against whichever algorithm the source used. Output is lowercase hexadecimal by default, with a toggle for uppercase since some tools print digests in capitals. The implementations are plain JavaScript running on your device, so your input is never transmitted — worth knowing before you hash anything sensitive. Read the security note carefully: two of these three algorithms are comprehensively broken for security purposes and are included only for checksums, deduplication and legacy compatibility.

How to use the Hash Generator

  1. 1

    Type or paste your text into the 'Text to hash' box.

  2. 2

    Read all three digests — MD5, SHA-1 and SHA-256 — which recompute on every keystroke.

  3. 3

    Tick 'Uppercase output' if you are comparing against a tool that prints hexadecimal in capitals.

  4. 4

    Copy the digest you need using the button beside it.

  5. 5

    Check the security note before using MD5 or SHA-1 for anything beyond an integrity check.

What people use it for

Verifying a downloaded file's checksum

Projects publish a digest alongside a release so you can confirm the download was not corrupted in transit or truncated by a flaky mirror.

Generating a Gravatar URL

Gravatar keys avatars on the MD5 hash of a lowercased, trimmed email address, one of the few places MD5 is still the required input rather than a legacy choice.

Producing a stable cache key

Hashing a canonical string gives a fixed-length key for a cache entry or a filename, with no risk of illegal characters or path length limits.

Deduplicating records

Hash the concatenated fields of each record and compare digests to find duplicates far faster than comparing the full text of every pair.

Collision resistance, and why MD5 and SHA-1 no longer have it

A cryptographic hash is expected to provide three properties. Preimage resistance means that given a digest you cannot find an input that produces it. Second preimage resistance means that given one input you cannot find a different input with the same digest. Collision resistance means you cannot find any two distinct inputs sharing a digest, and it is the weakest of the three to attack because the birthday bound puts the generic cost at roughly 2^(n/2) rather than 2^n. MD5, with its 128-bit output, fell first: Wang and Yu demonstrated practical collisions in 2004, and chosen-prefix collisions now take seconds on ordinary hardware, which is how the Flame malware forged a Microsoft code-signing certificate in 2012. SHA-1, at 160 bits, was broken in practice by the SHAttered attack in 2017, which produced two different PDF files with the same digest, and a chosen-prefix collision followed in 2020 at a cost of tens of thousands of pounds of cloud compute. Notably neither is broken for preimages, which is why checking an MD5 checksum against accidental corruption remains meaningful even though it offers no protection against a deliberate attacker.

Why none of these algorithms should hash a password

SHA-256 is not broken and remains the sensible default for integrity checks, HMACs and digital signatures. It is still the wrong tool for passwords, for a reason unrelated to its cryptographic strength: it is fast by design. A modern GPU computes billions of SHA-256 hashes per second, so a stolen database of unsalted SHA-256 password digests falls to a dictionary or brute-force attack quickly, and identical passwords produce identical digests, revealing which accounts share one. Password hashing needs a function that is deliberately slow and hard to parallelise, with a per-user random salt stored alongside the digest and a work factor you can raise as hardware improves. Argon2id is the current OWASP recommendation and won the 2015 Password Hashing Competition; bcrypt and scrypt remain acceptable, and PBKDF2 with a high iteration count is the choice where a certified primitive is mandated. Digest lengths, incidentally, are fixed by the algorithm: 32 hexadecimal characters for MD5, 40 for SHA-1 and 64 for SHA-256.

Tips

  • Hex digests are case-insensitive as values, so the same digest in capitals and in lowercase represents the identical hash.
  • Hashing is exact: one trailing newline or space changes the whole digest, so trim carefully before comparing checksums.
  • For message authentication use HMAC-SHA-256 with a secret key rather than hashing the secret and the message concatenated together.

Frequently asked questions

Can a hash be reversed?
No. Hashing is one way. However, short or common inputs can be found in precomputed rainbow tables, which is why passwords must be salted and hashed with a slow algorithm.
Which hash should I use?
Use SHA-256 for integrity checks and digital signatures. MD5 remains fine for non-security tasks such as detecting duplicate files.
Is my input sent to a server?
No. All three algorithms are implemented in JavaScript and run entirely on your device.

Looking for something else? Browse all developer tools or see every tool.