hash-generator

Type or paste any text to instantly compute its MD5, SHA-1, SHA-256, and SHA-512 hash values. All computation runs locally in your browser — nothing leaves your machine.

client-side only Web Crypto API no signup
input.txt
hash-values.json

// which algorithm to use

// hashing vs. encryption — they are not the same thing

A hash is a one-way function: the same input always produces the same output, but you cannot reconstruct the input from the hash. Encryption is two-way: a key encrypts data and a key decrypts it back. If you "hash" a password to store it in a database, that's correct — storing encrypted passwords means you have a key that can decrypt them, which is a security liability. If you need to be able to recover the original value, you want encryption, not hashing.

// how this tool computes the hashes

SHA-1, SHA-256, and SHA-512 are computed via the browser's SubtleCrypto API (crypto.subtle.digest()), which uses the browser's native cryptographic implementation — no third-party library involved. MD5 is not part of the Web Crypto API (it's considered legacy), so this tool uses a pure-JavaScript MD5 implementation. All inputs are UTF-8 encoded before hashing, matching how .NET's Encoding.UTF8.GetBytes() + SHA256.HashData() behaves.