Skip to main content

Hash Generator

Generate cryptographic hashes instantly. Process text or calculate file checksums locally in your browser using MD5, SHA-1, SHA-256, and more.

1. Select Algorithm

Drag and drop your file here or click to browse from device

Generated Hash

Compare Hash (Optional)

Ready
Length: 0 Size: 0 B Time: 0ms

Advertisement

Verifying Downloads and Catching Single Bit Changes

Suppose you download a Linux ISO, a database backup, or a firmware zip file from a mirror server and want to be certain the file did not get corrupted mid download or swapped out on a mirror. Cryptographic hash functions turn an entire file or text block of any size into a fixed length hexadecimal fingerprint. Flip a single bit anywhere inside a 2 GB archive and roughly half the bits in the resulting digest scramble unpredictably, an effect cryptographers call the avalanche property.

This hash generator computes MD5, SHA-1, SHA-256, SHA-384, and SHA-512 directly inside your browser across both UTF-8 text and raw uploaded files. Because it reads files locally via FileReader and computes SHA digests through the browser's native Web Crypto API (crypto.subtle.digest) alongside SparkMD5, files never leave your computer.

Comparing the Five Algorithms

Choosing the right digest depends on whether you are matching an old checksum file published by a vendor or building new verification logic from scratch:

Algorithm Digest Size Hex Length Recommended Role
MD5 128 bits 32 chars Legacy non security file integrity checks; collision broken since 2004
SHA-1 160 bits 40 chars Older Git commits and legacy checksums; broken against collision attacks (2017)
SHA-256 256 bits 64 chars Default standard for release checksums, TLS signatures, HMAC, and APIs
SHA-384 384 bits 96 chars High margin TLS certificates and JWT RS384/ES384 verification
SHA-512 512 bits 128 chars High security integrity proofs and fast 64 bit CPU hashing

Notice what "collision broken" means in practice. Neither MD5 nor SHA-1 can easily be reversed to guess arbitrary original text, yet an attacker with moderate computing power can craft two different PDFs or installers that produce the exact same MD5 or SHA-1 fingerprint. If a vendor only published an MD5 checksum to catch accidental download truncation, checking it here still confirms the transfer completed cleanly. For any security guarantee against deliberate tampering, always check or publish SHA-256 or SHA-512.

Why Your Text Hash Disagrees With Terminal sha256sum

One debugging surprise catches almost everyone who tests a hash in both a terminal and a browser box. You type hello into the Text Input box above and copy its SHA-256 digest: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Then you run echo "hello" | sha256sum in bash and get a totally different string starting with 5891b5b5....

Both answers are mathematically right because the inputs are different bytes! Standard echo silently appends a trailing newline byte ( , hex 0A) at the end of "hello", whereas typing five letters in a textarea has no trailing newline. Running printf "hello" | sha256sum instead omits the newline and matches the browser output character for character. Windows CRLF line endings ( ) vs Unix LF line endings ( ) across multi line snippets cause the exact same mismatch.

When using the Compare Hash field below the output box, notice two handy details. First, comparison trims spaces and ignores uppercase vs lowercase differences automatically, so Windows CertUtil uppercase digests match lowercase outputs without manual case conversion. Second, if you copy a line from a Linux SHA256SUMS file that looks like 2cf24dba... release.tar.gz, delete the trailing filename first so only the hexadecimal digest stays in the box.

Browser Security Contexts and Large File Limits

Native SHA hashing inside modern browsers relies on the Web Crypto API (crypto.subtle.digest), which hardware accelerates calculations cleanly while enforcing a strict browser security rule: Web Crypto only operates inside secure contexts (HTTPS pages or localhost). You never need to worry about that while using this hosted page, though if you ever save an HTML utility locally and open it over a raw file:// URL or plain HTTP local network IP, browsers disable crypto.subtle automatically (while pure JavaScript MD5 via SparkMD5 continues running).

One practical memory limit also applies in File Checksum mode. Because JavaScript reads uploaded files into an in memory ArrayBuffer before hashing, documents, installers, and archives up to a few hundred megabytes hash in fractions of a second. For large multi gigabyte OS disk images exceeding 1 to 2 GB, running native terminal tools such as sha256sum file.iso on Linux, shasum -a 256 file.iso on macOS, or Get-FileHash file.iso in Windows PowerShell avoids browser tab memory limits altogether. For long pasted logs in Text Input mode, toggling off Live Gen prevents unnecessary recomputing on every keystroke, and switching between Lowercase and Uppercase flips the displayed digest right away without recalculating the hash.

Advertisement

Fast Checksums vs Password Storage

Check out the Time metric in the bottom right bar after hashing a multi megabyte file: modern hardware computes SHA-256 and SHA-512 in milliseconds. That speed is wonderful for verifying huge software archives and terrible for storing user passwords.

Because GPUs can test tens of billions of raw MD5, SHA-1, or SHA-256 guesses per second, storing plain unsalted or even fast salted SHA-256 password hashes leaves short or reused user passwords exposed within hours if a database leaks. Furthermore, attackers keep large lookup lists of unsalted common strings precomputed for instant lookup. Never store application login passwords using raw MD5 or SHA-256; use slow, memory hard password hashing algorithms built specifically to resist GPU cracking, such as Argon2id, bcrypt, or scrypt, paired with unique random salts per account.

Hashing vs Encryption vs Encoding

Developers occasionally reach for a hash when they actually need reversible encoding or authenticated encryption. Keeping the three concepts separate prevents costly architectural bugs:

  • Hashing (SHA-256, SHA-512): One way fingerprinting with no secret key and no reverse path. Ideal for file integrity checksums, deduplication keys, and signed message digests.
  • Encryption (AES, RSA): Two way scrambling controlled by a key so authorized recipients can decrypt back to the original payload.
  • Encoding (Base64, URL encoding): Plain format translation with zero secrecy; anyone can decode a string back to text in seconds using tools like our Base64 Encoder & Decoder.

If you are verifying webhook signatures or inspecting HMAC signed tokens in your API workflow, pairing this tool with the JWT Decoder helps inspect token headers and claims, while the Password Generator creates strong high entropy secrets for signing keys and API credentials.