SHA Hash Generator — SHA-1, SHA-256, SHA-384, SHA-512
Compute cryptographic hashes of any text with a single paste. Hashing uses your browser's built-in Web Crypto implementation, so it is fast, standards-compliant and completely private.
What a hash function does
A cryptographic hash turns input of any size into a fixed-length fingerprint. SHA-256 always produces 256 bits (64 hex characters), SHA-512 produces 512 bits (128 hex characters). The same input always gives the same hash; changing a single character produces a completely different result; and it is computationally infeasible to go backwards from the hash to the input or to find two inputs with the same hash.
Choosing an algorithm
SHA-256 is the default choice for new systems: widely supported, fast, and used in TLS certificates, Git (newer repositories), Bitcoin and most package managers. SHA-512 is slightly faster on 64-bit CPUs and gives a longer digest. SHA-384 is SHA-512 truncated, common in TLS cipher suites. SHA-1 is considered broken for collision resistance and should only be used for compatibility with legacy systems (older Git object ids, some checksums), never for security.
Note that MD5 is deliberately not offered. It has practical collision attacks and should not be used for anything security related.
Hashing is not the same as password storage
Plain SHA hashes are fast — which is exactly what you do not want for passwords, because attackers can try billions of guesses per second. Store passwords with a slow, salted algorithm such as bcrypt, scrypt or Argon2. Use this tool for checksums, cache keys, content fingerprints and signature debugging.
How to use it
- Paste the text you want to hash. Line endings and trailing spaces matter — the tool hashes exactly what you provide.
- Read the SHA-1, SHA-256, SHA-384 and SHA-512 digests, shown as lowercase hex.
- Click a digest to copy it, then compare it with the value from your download page, CI log or API response.
Example
The SHA-256 hash of the text hello is:
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Change it to Hello (capital H) and the digest becomes 185f8db3… — completely different. This “avalanche effect” is what makes hashes useful for detecting tampering.
Common use cases
- Verifying that a downloaded file or script matches the SHA-256 checksum published by its author.
- Generating stable cache keys or deduplication ids from content.
- Debugging webhook signature validation (Stripe, GitHub, Slack) by hashing the raw request body.
- Creating Subresource Integrity (SRI) hashes for scripts and stylesheets served from a CDN.
A trailing newline changes everything
The tool shows four digests, SHA-1, SHA-256, SHA-384 and SHA-512, and recalculates as you type. There is no MD5, no HMAC and no file input. The most common reason a result does not match the command line is a hidden newline. The SHA-256 of hello is 2cf24dba…9824, but echo hello | sha256sum hashes hello plus a newline and gives 5891b5b5…be03. Use echo -n hello | sha256sum (or printf) to compare like with like, and remember that the text area keeps a newline if you press Enter at the end.
Frequently asked questions
Can I hash a file instead of text?
This page hashes text input. To check a file checksum locally, use sha256sum (Linux), shasum -a 256 (macOS) or Get-FileHash (PowerShell).
Why does my hash differ from the one I was given?
Usually because of an invisible difference: a trailing newline, Windows CRLF line endings, a UTF-8 BOM, or a trailing space. Hashes are byte-exact.
Can a hash be reversed to get the original text?
No. Hash functions are one-way. The only practical attack is guessing inputs and comparing hashes, which is why short or common inputs are effectively exposed.
Is anything sent to a server?
No. Hashing is performed by your browser's Web Crypto API; the text never leaves your device.
Does it support MD5 or HMAC?
No. The tool computes SHA-1, SHA-256, SHA-384 and SHA-512 of the text only. For keyed hashes such as HMAC-SHA256, use your language's crypto library.