What is a hash generator?
A cryptographic hash function takes any input – a word, a JSON payload, a 2 GB ISO image – and turns it into a fixed-length fingerprint called a digest. The same input always produces the same digest, while changing a single bit produces a completely different one. Hash functions are one-way: you cannot recover the original data from the digest. This tool computes MD5, SHA-1, SHA-256 and SHA-512 digests for text or files directly in your browser, using the native Web Crypto API for the SHA family.
Your data never leaves your device
Every calculation runs locally in JavaScript. Text you type and files you select are read by your browser and are never
uploaded to our servers, which makes the tool safe for configuration files, internal documents or release artifacts.
Your last input is kept in your browser's localStorage for convenience; press Clear Data
to delete it at any time.
Choosing the right algorithm
- MD5 (128 bits) – fast and still common for legacy checksums and cache keys, but broken against collision attacks. Never use it for security.
- SHA-1 (160 bits) – historically used by Git and TLS certificates. Practical collisions exist, so treat it as legacy only.
- SHA-256 (256 bits) – the modern default for file integrity, digital signatures, blockchains and API request signing.
- SHA-512 (512 bits) – a longer digest from the SHA-2 family, often faster than SHA-256 on 64-bit CPUs.
Practical examples
Verify a download
Projects often publish a SHA-256 checksum next to their installers. Select the downloaded file, choose SHA-256 and compare the result with the published value. If even one character differs, the file is corrupted or has been tampered with.
Compare with the command line
The digest of the text hello matches the output of standard tools:
$ printf 'hello' | sha256sum
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Note that echo hello appends a newline, which changes the hash. Use printf or
echo -n when comparing results.
Hashes are not password storage
General-purpose hashes are designed to be fast, which is exactly what an attacker wants when brute-forcing passwords. To store user passwords, use a slow, salted algorithm such as bcrypt or Argon2 – see our Bcrypt / Argon2 Validator in the security category.