Home/Developer Tools/Hash Generator
[ DEV.3 — HASH ]

Hash Generator

Compute MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes of any text — instantly, in your browser.

Last reviewed: May 2026

// Everything runs locally in your browser — nothing is sent to our servers.
A cryptographic hash function takes input of any length and produces a fixed-length output (a digest) that's effectively unique to the input. This tool computes MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes of text directly in your browser using the Web Crypto API (plus a self-hosted MD5 implementation).
// input text 0 chars · 0 bytes (UTF-8)
Hashes update live
// hex digestsLowercase hex, UTF-8 input
MD5 INSECURE
SHA-1 INSECURE
SHA-256
SHA-384
SHA-512
MD5 and SHA-1 are NOT secure. They're shown here for checksums and legacy compatibility only. Don't use them for passwords, signatures, file integrity against an adversary, or anything security-sensitive. Use SHA-256 or stronger. For passwords specifically, use a real KDF — bcrypt, scrypt, Argon2, or PBKDF2 — not a plain hash.

Need to decode a JWT or Base64 blob?

See all developer tools →

What is a hash?

A cryptographic hash function takes input of any length — a single character, a 4 GB ISO, a database row — and produces a fixed-length output called a digest (or just "the hash"). MD5 always returns 128 bits (32 hex chars). SHA-256 always returns 256 bits (64 hex chars). The input can be anything; the output is always the same length.

Good hash functions have three properties that make them useful: they're deterministic (the same input always produces the same output), one-way (you can't recover the input from the digest), and collision-resistant (it's computationally infeasible to find two different inputs that produce the same digest). The third property is what separates "secure" hashes (SHA-256, SHA-3) from "broken" ones (MD5, SHA-1).

Hashes are everywhere: Git commits, content-addressed storage, file integrity checks, HMAC, digital signatures, password storage (with a KDF), Merkle trees, blockchains, and the certificate chain that protects this very page. Almost every cryptographic primitive sits on top of one.

How the tool above works

Your input is encoded to UTF-8 bytes via new TextEncoder().encode(text). Those bytes are then fed into either the browser's built-in crypto.subtle.digest(algorithm, bytes) (for SHA-1, SHA-256, SHA-384, SHA-512) or a small self-hosted JavaScript MD5 implementation (because crypto.subtle intentionally doesn't expose MD5 — it's broken).

The resulting ArrayBuffer is converted to a lowercase hex string. There's no fetch, no upload, no third-party CDN script — open DevTools and check the network tab. Hashing happens in the same JavaScript thread that's rendering this page, then the output is written into the DOM.

Verify it for yourself

Two universally-known test vectors. Click "Load sample (abc)" above to fill the input with the string abc and compare:

md5("")d41d8cd98f00b204e9800998ecf8427e
md5("abc")900150983cd24fb0d6963f7d28e17f72
sha1("abc")a9993e364706816aba3e25717850c26c9cd0d89d
sha256("abc")ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
sha384("abc")cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
sha512("abc")ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f

Pick the right hash

  • MD5 — 128-bit. Broken since 2004; collisions can be generated in seconds on a laptop. Acceptable for non-security checksums, ETags, deduplication, and legacy compatibility. Never for passwords, signatures, or integrity against an attacker.
  • SHA-1 — 160-bit. Practically broken since 2017 (the SHAttered attack). Same advice as MD5: legacy only. Git still uses it for commit IDs (migration to SHA-256 is in progress), and that's the most common reason you'll see it today.
  • SHA-256 — 256-bit. The current workhorse. Used by TLS certificates, Bitcoin, most code-signing, and modern Subresource-Integrity tags. No practical attacks known. If you can pick one, pick this.
  • SHA-384 — Truncated SHA-512. Used in some TLS suites and where you want the extra security margin of the SHA-512 internal state without the full 512-bit output.
  • SHA-512 — 512-bit. Same family as SHA-256 with a larger internal state and word size. Faster than SHA-256 on 64-bit CPUs for large inputs. Common in code signing and as the basis for HMAC-SHA-512.

For things this tool deliberately doesn't include: SHA-3 / Keccak and BLAKE2/3 aren't in the Web Crypto API, so they'd need a much larger self-hosted implementation. Argon2, bcrypt, scrypt, PBKDF2 aren't hashes — they're password-hashing KDFs and belong on a server, not in a textbox.

Why MD5 needs a self-hosted implementation

The Web Crypto API (crypto.subtle) is the standardised way to do cryptography in a browser. It deliberately omits MD5 because MD5 is broken — browser vendors made the (correct) call that it shouldn't be a one-liner in a tool that's also used for things like signature verification. So for this page to compute MD5 without making a network call, MD5 has to be implemented in plain JavaScript and shipped inline.

The implementation on this page is a ~2.5 KB compact MD5 that follows RFC 1321 exactly. It's vetted against the standard test vectors above. If you're paranoid (you should be, for cryptography), open the page source and compare the constants against the RFC.

Frequently asked questions

Why is MD5 included if it's insecure?

MD5 is broken for security purposes — collisions can be generated in seconds — but it's still widely used for non-security checksums. ETags, file integrity checks against accidental corruption, deduplication, and a large body of legacy systems all still rely on MD5. Including it here lets you verify those checksums without reaching for a CLI.

Should I hash my password with this?

No. A plain hash — even SHA-256 or SHA-512 — is the wrong tool for password storage. Passwords need a slow, salted key-derivation function (KDF) like bcrypt, scrypt, Argon2, or PBKDF2 with a high iteration count. Plain hashes can be brute-forced billions of times per second on a GPU; KDFs are deliberately tuned to take ~100 ms per attempt. Password hashing belongs on a server, not in a browser tab.

Is my input sent anywhere?

No. The SHA family runs through your browser's built-in Web Crypto API (crypto.subtle.digest). MD5 runs through a small self-hosted JavaScript implementation included inline on the page. There is no fetch, no API call, no third-party CDN — everything is computed locally in your browser tab. Disconnect from the network if you want to prove it.

Why does the same input always give the same output?

That's the defining property of a cryptographic hash function: deterministic. The same input bytes always produce the same digest. Changing even a single bit of the input — flipping one character, adding a space, swapping a capital — should produce a wildly different output. That property is called the avalanche effect, and it's why hashes work for integrity verification: if even one byte of a file changes, the hash changes, and the receiver can tell.