Free tool

MD5, SHA-1 and SHA-256 hash generator

Type text or drop files to get the MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 hashes all at once, in hex or Base64. Add a key for HMAC, or paste a checksum to see whether it matches.

Free · no sign-up · runs in your browser, nothing is uploaded

Text input

0 bytes · UTF-8, no trailing newline · empty input: the hashes shown are of zero bytes

Hashes
MD5not for security…
SHA-1not for security…
SHA-256…
SHA-384…
SHA-512…
CRC-32error check only…

Which hash should you use?

A hash function turns any input into a fixed-size fingerprint. The same input always gives the same hash, and changing a single bit changes about half of the output. The algorithms differ in output size and in how hard it is to find two inputs with the same hash (a collision).

AlgorithmBitsHex lengthStatusGood for
MD512832Broken: collisions in secondsNon-security checksums, cache keys, dedup
SHA-116040Broken: public collision since 2017; NIST retires it by 2030Legacy systems, Git object IDs
SHA-25625664SecureFile checksums, signatures, HMAC, the default choice
SHA-38438496SecureTLS suites, Subresource Integrity
SHA-512512128SecureSame uses as SHA-256, with a longer digest
CRC-32328Not cryptographicCatching accidental corruption (zip, PNG, Ethernet)

None of these are for passwords. They are built to be fast, which lets an attacker try billions of guesses per second. Store passwords with a slow, salted function such as bcrypt or Argon2: the bcrypt generator explains how.

How to verify a download with its checksum

Projects publish a SHA-256 (sometimes MD5 or SHA-512) next to each download so you can check the file arrived intact and unmodified. Drop the file in the Files tab, paste the published checksum into Compare with a checksum, and the tool says which algorithm and file it matches. It accepts a bare hash, a sha256sum line, or the BSD form SHA256 (file) = ....

In a terminal:

# Linux
sha256sum ubuntu.iso
sha256sum -c SHA256SUMS          # check every file listed in a checksum file

# macOS
shasum -a 256 ubuntu.iso
md5 ubuntu.iso

# Windows PowerShell (SHA-256 by default)
Get-FileHash .\ubuntu.iso
Get-FileHash .\ubuntu.iso -Algorithm MD5

# Windows cmd
certutil -hashfile ubuntu.iso SHA256

With several files dropped, the tool also builds a SHA256SUMS file in the exact format sha256sum -c reads, so you can publish checksums for your own releases.

Generate MD5 and SHA-256 hashes in code

Browser JavaScript has SHA-1 and SHA-2 built in through Web Crypto (secure contexts only, so HTTPS or localhost). There is no MD5 in Web Crypto; use a library such as js-md5.

const bytes = new TextEncoder().encode('hello');
const buf = await crypto.subtle.digest('SHA-256', bytes);
const hex = [...new Uint8Array(buf)].map(b => b.toString(16).padStart(2, '0')).join('');
// 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Node.js

import { createHash, createHmac } from 'node:crypto';
createHash('md5').update('hello').digest('hex');      // 5d41402abc4b2a76b9719d911017c592
createHash('sha256').update('hello').digest('base64');
createHmac('sha256', secret).update(body).digest('hex'); // webhook signatures

Python

import hashlib, hmac
hashlib.md5(b'hello').hexdigest()
hashlib.sha256('héllo'.encode('utf-8')).hexdigest()
with open('big.iso', 'rb') as f:
    hashlib.file_digest(f, 'sha256').hexdigest()   # Python 3.11+
hmac.new(secret, body, 'sha256').hexdigest()

Go

sum := sha256.Sum256([]byte("hello"))
fmt.Printf("%x\n", sum)
fmt.Printf("%x\n", md5.Sum([]byte("hello")))

Shell. Watch the newline: echo adds one, so echo hello | md5sum hashes six bytes, not five.

printf '%s' hello | sha256sum   # 2cf24dba...  (no newline)
echo -n hello | md5sum          # 5d41402a...
echo hello | md5sum             # b1946ac9...  (hashes "hello\n")

Why two tools give different hashes

A hash is exact: any difference in the input bytes gives a completely different result. When hashes disagree, check these first.

CauseWhat happensFix
Trailing newlineecho and many editors add \n at the endprintf or echo -n
Line endingsWindows files use \r\n, Unix files \nNormalise before hashing, or hash the file itself
Text encodingUTF-8 vs UTF-16 vs Latin-1 give different bytes for é or emojiHash UTF-8 bytes; this tool always does
Hex input vs text"ff" as text is two bytes; as hex it is one byte 0xffPick "Hex bytes" above when the input is hex
Output formatUppercase vs lowercase hex, hex vs Base64Same hash; the comparison here ignores the difference

HMAC: hashes with a secret key

A plain hash proves nothing about who made it: anyone can hash a modified message. HMAC (RFC 2104) runs the hash twice with a secret key mixed in, so only holders of the key can create a valid tag. It is how APIs sign webhooks. GitHub sends X-Hub-Signature-256: sha256=<hex>, an HMAC-SHA256 of the raw request body with your webhook secret.

To debug a signature, paste the exact raw body into the tool, turn on HMAC with a key, enter the secret, and compare the HMAC-SHA256 row with the header. If it differs, the body was probably re-serialized (parsed and turned back into JSON) before hashing. In code, compare signatures with a constant-time function such as crypto.timingSafeEqual or Python's hmac.compare_digest.

More security tools for developers are listed in security tools on DevHunt. For encoding rather than hashing, see the Base64 encoder.

FAQ

Can an MD5 hash be decrypted?+

No. A hash is not encryption: it keeps no copy of the input, so there is nothing to decrypt. Sites that "decrypt" MD5 look the hash up in a table of hashes of known words and leaked passwords. That works for short or common inputs, which is why MD5 or SHA-256 alone must never be used to store passwords.

Is MD5 still secure?+

Not for anything security related. Researchers can create two different inputs with the same MD5 in seconds, and RFC 6151 says it should not be used where collision resistance matters. It is still fine as a quick checksum against accidental corruption, or as a cache key.

What is the difference between MD5, SHA-1 and SHA-256?+

Output size and strength. MD5 gives 128 bits (32 hex characters), SHA-1 160 bits (40), SHA-256 256 bits (64). MD5 and SHA-1 both have practical collision attacks; SHA-256 and the rest of the SHA-2 family have none known. For new work, use SHA-256 or SHA-512.

How long is a SHA-256 hash?+

256 bits, which is 32 bytes. Written in hex that is 64 characters; in Base64 it is 44 characters including one = of padding. The length is the same for an empty string and for a 4 GB file.

How do I get the SHA-256 of a file?+

Drop it on the tool above (Files tab); it is hashed in your browser. In a terminal: sha256sum file on Linux, shasum -a 256 file on macOS, and Get-FileHash file in Windows PowerShell (SHA-256 is its default) or certutil -hashfile file SHA256 in cmd.

Why is my hash different from another tool?+

Almost always the input differs by an invisible byte. echo adds a newline (use echo -n or printf), Windows files may end lines with \r\n, and some languages hash text as UTF-16 instead of UTF-8. Uppercase vs lowercase hex, or hex vs Base64, is the same hash written differently.

What is HMAC and when do I need it?+

HMAC (RFC 2104) mixes a secret key into the hash, so only someone with the key can produce or check it. Webhooks use it: GitHub signs payloads with HMAC-SHA256 in the X-Hub-Signature-256 header, and Stripe signs events with HMAC-SHA256 too. Turn on "HMAC with a key" above to compute one.

Is my text or file uploaded?+

No. Hashing runs in your browser with the Web Crypto API (SHA family) and a small JavaScript MD5 library. Nothing you type or drop is sent anywhere, and the HMAC key is never put in the page URL.

Sources: RFC 1321 (MD5) · RFC 6151 (MD5 security) · FIPS 180-4 (SHA-1, SHA-2) · NIST: retiring SHA-1 · SHAttered (SHA-1 collision) · RFC 2104 (HMAC) · MDN: SubtleCrypto.digest() · Python hashlib · Node.js crypto · GitHub: validating webhook deliveries · Microsoft: Get-FileHash. Checked 2026-10-30.