Hash Generator computes MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes of any text or file entirely in your browser using the Web Crypto API. Paste a string or upload a file, select the algorithm, and the hash digest appears instantly in hex or Base64 format. Use the compare field to verify a hash matches an expected value — useful for checking download integrity or comparing password hashes.
Type or paste text into the input field — the hash is computed in real time as you type.
Select the algorithm: MD5, SHA-1, SHA-256, SHA-384, or SHA-512.
Toggle Uppercase to switch the output between lowercase and uppercase hex.
Paste an expected hash in the Compare field to verify whether the input matches — a green checkmark confirms a match.
Click Upload file to hash a file directly — useful for verifying download integrity.
What is a cryptographic hash?
A cryptographic hash function takes any input and produces a fixed-length output (the hash or digest) that appears random. The same input always produces the same hash, but even a one-character change produces a completely different output. Hashes are one-way — you cannot reverse a hash to recover the original input. They are used to verify file integrity, store passwords securely, and create digital signatures.
SHA-1 vs SHA-256 vs SHA-512
SHA-1 — produces a 160-bit (40 hex character) digest. Considered cryptographically broken for digital signatures; still used in legacy systems and Git commit IDs.
SHA-256 — part of the SHA-2 family, 256-bit (64 hex chars). The current standard for most security applications including TLS certificates, Bitcoin mining, and HMAC-SHA256 signing in JWTs.
SHA-384 — 384-bit variant of SHA-2, used in some TLS cipher suites and Subresource Integrity (SRI) hashes.
SHA-512 — 512-bit (128 hex chars), the strongest SHA-2 variant. Preferred where maximum collision resistance is needed.
This tool runs entirely in your browser
All hashing is computed using the Web Crypto API — your input never leaves your device. Suitable for checking file checksums, generating content hashes for cache-busting, and verifying data integrity.