Hash Generator (SHA-1, SHA-256, SHA-384, SHA-512)
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or a file, entirely in your browser with the Web Crypto API. Nothing is uploaded.
—
—
—
—
Hashes are computed in your browser with the Web Crypto API — nothing is uploaded. SHA-1 is included for compatibility only; it is broken for security purposes. Use SHA-256 or stronger for integrity checks, and a dedicated password hash (bcrypt, scrypt, Argon2) for passwords. MD5 is not offered because the browser’s crypto API does not implement it and it has no remaining security value.
Cryptographic hashes: what they are for
A cryptographic hash function turns any input — a word, a document, a disk image — into a fixed-length string of hex digits called a digest. The same input always yields the same digest, any change to the input changes the digest completely and unpredictably, and you cannot work backwards from a digest to the original data. These properties make hashes the standard tool for verifying integrity: publish the SHA-256 of a download, and anyone can confirm their copy is byte-for-byte identical.
This tool exposes the four hashes the browser’s Web Crypto API provides: SHA-1 (160-bit), SHA-256 (256-bit), SHA-384 and SHA-512. SHA-256 is the right default for checksums, content-addressed storage and deduplication keys. SHA-384 and SHA-512 give a larger digest and resist length-extension attacks. SHA-1 is included only for checking against legacy systems — it has been broken since 2017 and should not be used where collision resistance matters.
Hashes are not encryption and not a password-storage mechanism. Encryption is reversible with a key; a hash is one-way. And because SHA functions are designed to be fast, an attacker who steals a database of raw SHA-256 password hashes can test billions of guesses per second on a GPU. Passwords need a deliberately slow, salted algorithm — bcrypt, scrypt or Argon2 — not a bare SHA hash, optionally with a server-side pepper.
MD5 is not offered here. The Web Crypto API omits it by design because collisions can be generated trivially, and a JavaScript reimplementation would mostly serve to help people make insecure choices. If you genuinely need MD5 to match an old checksum file, use a command-line tool where the "insecure, compatibility only" context is unmistakable.
All hashing happens in your browser. Text is encoded to UTF-8 bytes and files are read into memory locally; nothing is uploaded, and the tool keeps working with the network disconnected.
Key formulas (reference)
digest = SHA-nnn( bytes )
text → bytes: new TextEncoder().encode(text) // UTF-8
file → bytes: await file.arrayBuffer()
compute: await crypto.subtle.digest("SHA-256", bytes) → ArrayBuffer → hexRelated tools
These free tools pair well with this page — open them in a new tab to finish your workflow.
Frequently Asked Questions
Which hash algorithms does this tool support?
SHA-1, SHA-256, SHA-384 and SHA-512, all computed through the browser’s Web Crypto API (crypto.subtle.digest). SHA-256 is the sensible default for file integrity and checksums.
Why is there no MD5 option?
The Web Crypto API deliberately does not implement MD5 because it is cryptographically broken — collisions can be produced in seconds. Adding a JavaScript MD5 implementation would invite misuse. If you only need MD5 to match a legacy checksum, use a dedicated command-line tool where the security caveats are explicit.
Is it safe to hash passwords with this?
No. Raw SHA hashes are far too fast, which makes offline brute-force cheap. Passwords should be stored with a slow, salted algorithm designed for the purpose: bcrypt, scrypt or Argon2. Use this tool for checksums, deduplication keys, and content fingerprints — not credential storage.
Does my text or file get uploaded?
No. Hashing runs entirely in your browser. The file you pick is read into memory with the File API and never leaves your device. You can disconnect from the network and the tool still works.
Why do I get the same hash every time for the same input?
That is the defining property of a cryptographic hash: it is deterministic. Identical input always produces identical output, and any change — even one character or one byte — produces a completely different digest. This is what makes hashes useful for verifying that a download was not corrupted or tampered with.
What is the difference between SHA-384 and SHA-512?
SHA-384 is computed with the SHA-512 algorithm but uses different initial values and truncates the output to 384 bits. It offers the same practical security as SHA-512 with a shorter digest, and resists length-extension attacks that affect SHA-256 and SHA-512.
Can I verify a checksum published by a project?
Yes. Pick the file, read the digest for the algorithm the project used (usually SHA-256), and compare it character-for-character with the published value. A single mismatch means the file differs from the one that was signed.