Hash Generator
Generate SHA-1, SHA-256 and SHA-512 hashes from any text -- computed securely in your browser using the Web Crypto API.
Disclaimer: This tool runs entirely in your browser -- nothing you enter is sent to or stored on our servers.
How Cryptographic Hashing Works
A cryptographic hash function takes input data of any size and produces a fixed-size output (the hash, or digest). Key properties: deterministic (the same input always produces the same output), irreversible (you cannot reconstruct the input from the hash alone), and the avalanche effect (a tiny input change completely changes the output). This generator computes SHA-1 (160-bit), SHA-256 (256-bit, today's standard), and SHA-512 (512-bit, extra security margin) using the Web Crypto API -- entirely client-side, so your text never leaves your browser.
Practical uses: file integrity verification (compare the hash of a downloaded file against the hash published by the official source); API request signing (HMAC uses a secret key combined with a hash function); and generating unique content fingerprints for caching. Never use SHA-1 (deprecated) for security-critical applications, and never hash passwords directly with SHA-256/512 for storage -- use a dedicated password-hashing algorithm like bcrypt or Argon2, which are deliberately slow to resist brute-force attacks in a way general-purpose hash functions are not.
Worked Example
Hashing the text "SmartUtilz" with SHA-256 produces a fixed 64-character hexadecimal digest. Change even one character -- say, to "smartutilz" (lowercase) -- and the entire output changes completely and unpredictably, which is the avalanche effect in action and exactly what makes hashes reliable for detecting even single-byte tampering in a file.
Worked Example: Four Inputs That Look Almost Identical
Type each of the following into the box and compare the results. Only the first 16 characters of each SHA-256 digest are shown here to save space:
| Input | SHA-256 (first 16 hex characters) |
|---|---|
hello | 2cf24dba5fb0a30e |
Hello | 185f8db32271fe25 |
hello followed by one space | 5e3235a8346e5a45 |
hello followed by a line break | 5891b5b522d5df08 |
The four digests share nothing in common, even though a human reader would call the inputs the same word. Whatever you enter, the lengths stay fixed: SHA-1 gives 40 hexadecimal characters, SHA-256 gives 64 and SHA-512 gives 128. The same text always returns the same digest, so you can regenerate it later and compare.
Common Mistakes
- Adding an invisible space or line break. A trailing space or newline, often picked up when copying from a document or terminal, produces a completely different digest. Check the end of your text if a comparison fails.
- Ignoring letter case. “Hello” and “hello” hash differently, so retype exactly what was originally hashed.
- Calling a hash encryption. A hash cannot be turned back into the original text. If you need to recover the data later, you want encryption rather than hashing.
- Storing passwords as plain SHA-256. As the page explains, password storage needs a purpose-built slow algorithm such as bcrypt or Argon2.
- Expecting this box to hash a file. The tool hashes the text typed or pasted into it, not a file on your device. Pasting a file’s contents will not reproduce a published file checksum, because line endings and encodings may differ.
Where You Would Use This
- Checking a pasted value: confirm that a string you were given produces the digest that the sender quoted.
- Creating cache or content keys: make a short, fixed-length fingerprint for a longer piece of text.
- Teaching and demos: show students how a tiny change in an input alters the whole output.
- Testing code: produce an expected digest to compare with what your own program generates.