Hash Generator
Generate cryptographic hash digests and verify file checksums with SHA-256, SHA-384, SHA-512, and legacy MD5/SHA-1.
General-purpose hashes such as SHA-256 should not be used directly for password storage. Use a dedicated password-hashing algorithm such as Argon2, bcrypt, or scrypt.
- Local ProcessingText and files are hashed entirely in your browser.
- Multiple AlgorithmsGenerate SHA-256, SHA-384, SHA-512, and supported legacy checksums.
- File ChecksumsVerify files by comparing deterministic hash values.
Knowledge Base
Understanding Cryptographic Hashes
A cryptographic hash function converts arbitrary-length input data into a fixed-length string of bytes (a digest). The process is strictly deterministic and one-way.
Deterministic
The exact same input always yields the exact same hash digest, regardless of when or where it is executed.
Fixed Length
Whether hashing a single character or a 100MB file, SHA-256 always produces exactly 256 bits (64 hex characters).
One-Way
It is computationally infeasible to reconstruct the original input from its resulting hash digest.
Avalanche Effect
Changing even a single bit or letter in the input drastically alters the resulting hash output.
Cryptographic Algorithm Comparison
| Algorithm | Digest Size | Security Status | Typical Use Case |
|---|---|---|---|
| SHA-256 | 256-bit (32 bytes) | Recommended | Standard general hashing, file integrity, blockchain |
| SHA-384 | 384-bit (48 bytes) | Recommended | High-assurance security architectures, TLS certificates |
| SHA-512 | 512-bit (64 bytes) | Recommended | 64-bit performance systems, cryptographic workflows |
| SHA-1 | 160-bit (20 bytes) | Legacy | Legacy Git commits, older checksums (collision vulnerable) |
| MD5 | 128-bit (16 bytes) | Legacy | Legacy checksum systems, non-cryptographic cache keys |
Developer Implementation Guides
Reference implementations for computing SHA-256 across popular programming environments.
// Browser Web Crypto API (native, client-side, UTF-8)
async function computeSha256(message: string): Promise<string> {
const bytes = new TextEncoder().encode(message);
const hashBuffer = await crypto.subtle.digest("SHA-256", bytes);
return Array.from(new Uint8Array(hashBuffer), (b) =>
b.toString().padStart(, "0")
).join("");
}
// Example usage
computeSha256("hello").then(console.log);
// Output: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824FAQ