Local-only · Web Crypto API + Pure-TS MD5
Hash Generator
Compute SHA-256, SHA-384, SHA-512, SHA-1, and MD5 digests for text or local files simultaneously — plus instant checksum verification. Zero uploads; everything stays on this device.
Hash Generator
file.arrayBuffer() & crypto.subtle — 0 bytes leave your browserInstant Checksum Verifier
Paste expected hashCompares automatically against all 5 computed digests above whenever input or file changes.
Which hash algorithm to use
Use SHA-256 or SHA-512 for integrity checks. Never use bare fast hashes for passwords.
Cryptographic hashes are one-way digests — you cannot decrypt or recover the original text or file from the hash. The same byte sequence always produces the exact same digest.
SHA-256 and MD5 are engineered to run billions of times per second on GPUs. For user passwords, always use a slow, salted password KDF like bcrypt or Argon2id.
Hash in terminal & code
Run the same digest calculation locally from your shell, Node.js, Python, or browser.
# Hash text (no trailing newline)
printf '%s' 'Hello World' | shasum -a 256
printf '%s' 'Hello World' | shasum -a 512
printf '%s' 'Hello World' | md5sum # macOS: md5
# Hash a local file & verify checksum
sha256sum archive.tar.gz # macOS: shasum -a 256 archive.tar.gz
sha256sum -c checksums.txtimport { createHash } from 'node:crypto';
import { createReadStream } from 'node:fs';
const text = 'Hello World';
for (const alg of ['sha256', 'sha384', 'sha512', 'sha1', 'md5']) {
const digest = createHash(alg).update(text, 'utf8').digest('hex');
console.log(`${alg.toUpperCase()}: ${digest}`);
}
// Stream a local file without loading it all into memory
const hash = createHash('sha256');
for await (const chunk of createReadStream('archive.tar.gz')) {
hash.update(chunk);
}
console.log('File SHA-256:', hash.digest('hex'));import hashlib
text = "Hello World".encode("utf-8")
for alg in ("sha256", "sha384", "sha512", "sha1", "md5"):
print(f"{alg.upper()}: {hashlib.new(alg, text).hexdigest()}")
# Hash a local file in 64 KB chunks (Python 3.11+)
with open("archive.tar.gz", "rb") as f:
print("File SHA-256:", hashlib.file_digest(f, "sha256").hexdigest())async function digestHex(algorithm, input) {
const bytes = typeof input === 'string'
? new TextEncoder().encode(input)
: input;
const buffer = await crypto.subtle.digest(algorithm, bytes);
return Array.from(new Uint8Array(buffer))
.map((b) => b.toString(16).padStart(2, '0'))
.join('');
}
const sha256 = await digestHex('SHA-256', 'Hello World');
const sha512 = await digestHex('SHA-512', 'Hello World');
console.log({ sha256, sha512 });