Hash Generator
Max 256 KB · Hashes automatically as you type
Processed entirely in your browser — nothing is sent to a server.
A hash function takes an input of any length and produces a fixed-length string of characters — the “hash” or “digest” — that acts as that input’s fingerprint. The same input always produces the same hash, a tiny change to the input produces a completely different hash (not a similar one), and — for a well-designed algorithm — there’s no practical way to work backwards from a hash to recover the original input, or to find two different inputs that hash to the same value. That one-way property is what separates hashing from encoding: Base64 or URL encoding are reversible by design, while a hash is deliberately not.
This tool computes five widely used hash algorithms — MD5, SHA-1, SHA-256, SHA-384, and SHA-512 — from any text you paste in, all client-side. SHA-1, SHA-256, SHA-384, and SHA-512 run through the browser’s built-in Web Crypto API (crypto.subtle.digest), the same native mechanism this site’s JWT Encoder uses for its HMAC signing. MD5 is not part of that API — it was deliberately left out as a legacy algorithm — so it’s implemented here directly in JavaScript, following its 1992 specification (RFC 1321), which hasn’t changed since.
MD5 and SHA-1 are not secure. Both have known, practical collision attacks: it’s possible to deliberately construct two different pieces of data that produce the same hash. That doesn’t make them useless — they’re still fine for catching accidental corruption, like confirming a file downloaded correctly — but neither should be used anywhere an adversary might benefit from forging a match: password storage, digital signatures, or verifying that a file hasn’t been tampered with by someone who wants it to look untampered. SHA-256 and above have no known practical attack and are the current standard for that kind of integrity check. None of the five algorithms here are appropriate for hashing passwords directly, regardless of strength — password storage needs a deliberately slow, salted algorithm (bcrypt, scrypt, Argon2) designed to resist brute-forcing, which is the opposite design goal of a general-purpose hash like SHA-256.
Every algorithm updates live as you type, debounced slightly so it doesn’t recompute on every keystroke, and each result has its own Copy button. Since hashed input can itself be sensitive — a password you’re checking, an API token, anything you wouldn’t want logged — this page never loads analytics and displays the same “processed entirely in your browser” guarantee as this site’s other sensitive-input tools.
Examples
- Verifying a downloaded file's integrity — a project's download page publishes a SHA-256 checksum alongside the file; paste the file's contents (or use a command-line tool to hash the file itself, then paste that output here to double-check by eye) and confirm the two match before trusting the file.
- Generating a cache key or deduplication ID — hash a piece of content (e.g. a URL or a config's JSON Formatter output) to get a fixed-length, collision-resistant identifier for it, without needing a database round-trip to check for duplicates.
- Checking whether two pasted blobs are byte-identical — rather than comparing two long strings by eye (or after a round trip through Base64 Encode/Decode), hash both and compare the much shorter digests instead.