Hash Generator
Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes for text or files.
SHA-1
—
SHA-256
—
SHA-384
—
SHA-512
—
What is it?
This tool computes cryptographic hash digests — SHA-1, SHA-256, SHA-384, and SHA-512 — for text you type or a file you select, using the browser's built-in Web Crypto API.
Formula Explanation
A hash function takes any input and produces a fixed-length string of hexadecimal characters (the digest), such that even a tiny change to the input produces a completely different output. SHA-256, for example, always produces a 64-character hex digest regardless of whether the input is one character or one gigabyte, and it's computationally infeasible to reverse the digest back into the original input.
Example Calculation
The text Hello, World! hashes to dffd6021bb2bd5b0af676290809ec3a53191dbd in SHA-1.
How to Use
- Choose Text or File mode.
- For text, type or paste the content directly.
- For a file, select it from your device — hashing starts automatically.
- Copy any of the four hash digests shown.
Benefits
- Computes four hash algorithms at once, so you don't need to pick just one upfront.
- Hashes files without uploading them anywhere — everything happens locally in your browser.
- Uses the same Web Crypto API implementation trusted by browsers for security-sensitive operations.
Use Cases
- Verifying a downloaded file matches its published checksum before trusting it.
- Generating a hash to check for duplicate or tampered file content.
- Producing a hash of text for use in code, such as a cache key or integrity check.
What Your Result Means
If a computed hash matches a published or expected checksum exactly, the file or text is confirmed unmodified; even a single changed byte produces a completely different digest, so a mismatch means the content differs from what was expected.
Tips
- SHA-256 is the most common general-purpose choice today; SHA-1 is considered weak for security purposes but still used for legacy checksums.
- When verifying a downloaded file, compare the full hash string exactly — even one different character means a mismatch.
- Hashing is one-way: you can verify content matches a known hash, but you can't recover the original content from the hash alone.
Common Mistakes
- Confusing hashing with encryption — hashes can't be decrypted back into the original input.
- Comparing hashes generated with different algorithms (e.g., comparing a SHA-1 hash to a SHA-256 hash), which will never match.
- Assuming SHA-1 is still safe for security-critical uses — it's fine for basic integrity checks but shouldn't be relied on for security purposes.
FAQs
Does this tool upload my file or text to a server?
No, hashing happens entirely in your browser using the Web Crypto API — files and text are never uploaded anywhere.
Why isn't MD5 included?
Browsers' built-in Web Crypto API doesn't support MD5 since it's considered cryptographically broken — this tool only offers the SHA family, which is natively supported and more secure.
Can I hash very large files?
Yes, though very large files may take a few seconds and use more memory since the whole file is read before hashing.
Why do I get a completely different hash for a tiny text change?
This is by design — hash functions are built so that even a one-character change produces a totally different digest, making it easy to detect any modification.
Hashing happens locally in your browser using the Web Crypto API; files and text are never uploaded to a server.
Last updated: July 27, 2026