Hash Generator

MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC for text or a file.

About Hash Generator

A hash generator that computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 digests or HMACs of any text or file at once, entirely in your browser.

How to use

  1. Type or paste text, or choose a file. All five digests update about 150 ms after you stop typing and are dimmed while they are being recomputed; there is no button to press. The empty string has a digest too.
  2. Enter an HMAC key to turn every row into an HMAC with that key instead of a plain digest.
  3. Each algorithm has its own Copy button. Copy on the panel copies all five, and Download saves them as hashes.txt.
  4. Press Clear to start again.

What it supports

Algorithm Digest length Status
MD5 128 bits, 32 hex characters Broken since 2004; checksums of old downloads only
SHA-1 160 bits, 40 hex characters Broken for collision resistance since 2017; legacy use only
SHA-256 256 bits, 64 hex characters Recommended general purpose hash
SHA-384 384 bits, 96 hex characters SHA-2 family
SHA-512 512 bits, 128 hex characters SHA-2 family, faster on 64-bit CPUs
  • Input is hashed as UTF-8 bytes, so é hashes as two bytes and whitespace and line breaks count.
  • Output is lowercase hexadecimal.
  • A file is hashed as its exact bytes; the text box is ignored while a file is chosen. Files up to 50 MB.
  • Not supported: SHA-3, BLAKE2, CRC32, or keys given as hex rather than text.
  • A hash is one-way: the tool cannot reverse a digest back to its text.

Example

The quick brown fox
→ SHA-1   c519c1a06cdbeb2bc499e22137fb48683858b345
→ SHA-256 5cac4f980fedc3d3f1f99b4be3472c9b30d56523e632d151237ec9309048bda9

Privacy

Hashing uses crypto.subtle.digest and crypto.subtle.sign in the page; MD5, which WebCrypto does not implement, is computed in plain JavaScript. No request is made, and nothing is stored.

Frequently asked questions

What is the difference between SHA-1 and SHA-256?
SHA-1 produces a 160-bit digest and has had practical collision attacks since 2017, so it should not be used for signatures or integrity checks. SHA-256 produces a 256-bit digest, is part of the SHA-2 family, and has no known practical attack.
Can a hash be decrypted?
No. A hash is a one-way function, so there is no key and no reverse operation. The only way to find the input is to guess candidates and hash each one, which is why passwords should be hashed with a slow, salted algorithm such as bcrypt or Argon2 rather than plain SHA-256.
Should I still use MD5?
Only to check an old download that publishes nothing else. MD5 collisions have been practical since 2004, so it must not be used for signatures, passwords or integrity checks; the browser’s WebCrypto API does not even implement it, which is why this tool computes it in plain JavaScript.
Why do I get a different hash from another tool?
Usually because of a trailing newline, different line endings, or a byte order mark. Hashes are computed over exact bytes, so one invisible character produces a completely different digest.