Security

Hash Generator

Hash text or files with MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256, CRC32 and xxHash64, with optional HMAC, and check a download against its expected checksum.

Hash Generator
Hash text as you type, or a file of any size. Everything stays in your browser.

0 bytes. A trailing space or newline changes the hash.

Algorithms
Hashes
MD5
weak
…
SHA-1
weak
…
SHA-256
…
SHA-384
…
SHA-512
…
SHA3-256
…
CRC32
…
xxHash64
…

MD5 and SHA-1 are broken for security: use them only to spot accidental corruption, never for passwords or signatures. CRC32 and xxHash64 are checksums, not secure hashes.

About this tool

The Hash Generator computes checksums and message digests for text or files in your browser. Type or paste text and the MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256, CRC32 and xxHash64 values update as you type, using UTF-8 encoding. Drop in a file of any size, even several gigabytes, and it is read in small chunks and fed to every algorithm in a single pass, with a progress bar and a cancel button, so the whole file never has to fit in memory. Show each digest as lowercase hex, uppercase hex or Base64, and add a secret key to get HMAC values for the cryptographic algorithms, with the key given as text or hex. Paste the checksum a website publishes into the compare box, in hex or Base64 or as a sha256sum line, and the matching algorithm is highlighted so you know the file downloaded intact. MD5 and SHA-1 are marked as broken for security uses. Nothing you hash is uploaded.

How to use the Hash Generator

  1. Choose Text and type or paste, or choose File and drop in the file you want to check.
  2. Read the digests for every algorithm, and switch between lowercase hex, uppercase hex and Base64.
  3. To get HMAC values, turn on HMAC and enter the secret key as text or hex.
  4. To verify a download, paste the published checksum into Compare. The matching algorithm is highlighted.
  5. Copy any value with its copy button.

Use it from your code

The Hash Generator is also a REST API endpoint. Create a free API key and call it from your own scripts and apps.

# Hash text
curl -X POST https://opentools.ca/api/v1/tools/hash-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --form-string "text=hello" \
  --form-string "algorithms=md5,sha256"

# Hash a file as an HMAC
curl -X POST https://opentools.ca/api/v1/tools/hash-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  --form-string "algorithms=sha256" \
  --form-string "hmacKey=secret"

Give us your feedback

Help us improve Hash Generator!

Frequently asked questions

Is my file uploaded?

No. Files and text are hashed in your browser with WebAssembly. Large files are read from your disk in 4 MB pieces, so nothing is sent anywhere and memory use stays low.

Can I use MD5 or SHA-1 for passwords or signatures?

No. Both are broken: attackers can create different files with the same hash. They are still fine for spotting accidental corruption. For security use SHA-256 or better, and for storing passwords use a slow password hash such as Argon2 or bcrypt, not any of these.

Why does my hash differ from another tool's?

Text is hashed as UTF-8 exactly as typed, so a trailing newline, a different line ending (Windows CRLF versus LF) or a different encoding changes the result. Hashing a file avoids those differences.

What is HMAC?

HMAC mixes a secret key into the hash, so only someone with the key can produce or check the value. APIs use it to sign webhooks and requests. It applies to MD5, SHA-1, SHA-2 and SHA-3 here; CRC32 and xxHash64 are not designed for keys.

How large a file can it hash?

There is no fixed limit. Files are streamed, so multi-gigabyte files work; the time depends on your disk and processor. You can cancel at any point.

Hash Generator screenshot