Web & Developer Tools

Hash Generator

Generate a cryptographic hash from text using the algorithms exposed by the browser tool.

Hash Generator — Online Calculator

Hash Generator

Generate local MD5 and SHA digests from text or files.

A hash turns any text or file into a fixed-length fingerprint: same input, same fingerprint, every time — and change one character and the fingerprint changes completely. This generator computes MD5, SHA-1, SHA-256, SHA-384, and SHA-512 digests entirely in your browser, so nothing you hash is ever transmitted.

How It Works

A cryptographic hash function is a one-way mathematical compression: it accepts input of any length and emits a digest of fixed length — 128 bits for MD5, 256 bits for SHA-256, 512 bits for SHA-512 — expressed here in hexadecimal. Three properties make hashes useful:

  • Deterministic: identical input always yields identical output, which is what makes verification possible.
  • Avalanche effect: flipping a single input bit changes about half the output bits, so similar inputs have unrecognizably different digests.
  • One-way: given a digest, there is no practical way to reconstruct the input except guessing it and hashing the guess.

In this tool the SHA family is computed with the browser's native Web Crypto API (crypto.subtle.digest), and MD5 — which Web Crypto omits precisely because it is obsolete — is computed with a WebAssembly library. Text is UTF-8 encoded before hashing; files are hashed as raw bytes. An uppercase display option is available for systems that expect it.

Worked Example — Verify It Yourself

Hash the word hello and you should get:

| Algorithm | Digest of hello | | --- | --- | | MD5 | 5d41402abc4b2a76b9719d911017c592 | | SHA-1 | aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d | | SHA-256 | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |

These values are the same on every correct implementation on Earth — that reproducibility is the point. Now change the input to Hello (capital H) and every digest changes beyond recognition, demonstrating the avalanche effect. If a download site publishes a SHA-256 for a file, hash the file here: a match is strong evidence the bytes are exactly what the publisher released; a mismatch means corruption or tampering.

Choosing an Algorithm

  • SHA-256 — the default for integrity checks, signatures, and certificates; use it unless you have a reason not to.
  • SHA-384 / SHA-512 — SHA-2 siblings with larger outputs; SHA-512 is often faster on 64-bit systems, and SHA-384 is SHA-512 truncated with different initial values.
  • SHA-1 — collision attacks are practical (the SHAttered proof, 2017). Acceptable only for legacy compatibility and non-adversarial checksums.
  • MD5 — collisions can be generated in seconds; treat it as a casual checksum (did the copy complete?) and never as security.

Hashing Is Not Encryption — and Not Password Storage

A hash cannot be "decrypted"; there is no key and no reverse operation. That also means hashes prove integrity, not authorship — anyone can compute the same digest. And while systems verify passwords by comparing hashes, storing a raw SHA-256 of a password is unsafe practice: hashes here are fast, so attackers can test billions of guesses per second. Password storage needs salted, deliberately slow functions (bcrypt, scrypt, Argon2) — a different tool for a different job. For everyday integrity work — verifying downloads, fingerprinting content, detecting duplicate files, generating cache keys — the fast hashes above are exactly right.

Frequently Asked Questions

Is my text or file uploaded anywhere?

No. All five algorithms run locally in your browser — SHA through the Web Crypto API and MD5 through WebAssembly. The tool reports the input's byte length and the digests; nothing leaves your device.

Why is the same text giving me a different hash than another site?

Check three things: the algorithm (MD5 vs SHA-256), the encoding (UTF-8 assumed here — a file hashed raw differs from its text re-encoding), and invisible characters — a trailing newline or space is a different input and produces a completely different digest.

How long is each digest?

In hex characters: MD5 32, SHA-1 40, SHA-256 64, SHA-384 96, SHA-512 128 — each hex character carries 4 bits of the underlying digest (128, 160, 256, 384, and 512 bits respectively).

Related Tools