Hash Generator
Generate SHA-256, SHA-384, SHA-512, or SHA-1 hashes from text or files. 100% client-side via Web Crypto API.
How to Use the Hash Generator
- Enter your text in the input area on the left (or top on mobile), or click "Hash File" to select a file from your device.
- Choose a hash algorithm — SHA-256 (default), SHA-384, SHA-512, or SHA-1.
- View the hash — the hexadecimal hash digest appears instantly on the right.
- Copy or download — use the buttons above the output to copy the hash to your clipboard or download it as a text file.
What This Tool Does
This hash generator uses the Web Crypto API built into modern browsers to compute cryptographic hash digests. When you enter text or select a file, the tool converts the input into bytes, passes them through the selected hashing algorithm, and displays the resulting fixed-length hexadecimal string. Everything happens locally in your browser — no data is ever transmitted to a server.
Features
- Four algorithms — SHA-256, SHA-384, SHA-512, and SHA-1, all via the native Web Crypto API
- Text and file hashing — hash plaintext input or any file from your device
- Real-time updates — hashes are computed as you type with debounced processing
- Hex output — standard lowercase hexadecimal representation of the hash digest
- Copy and download — one-click copy to clipboard or download as a .txt file
- Privacy first — no server round-trips, no logging, no data collection
Understanding Hash Algorithms
The SHA (Secure Hash Algorithm) family was designed by the NSA and published by NIST. SHA-256 is the most commonly used variant and produces a 256-bit (64-character hex) digest. It is used in TLS certificates, Git commits, Bitcoin mining, and countless other applications. SHA-384 and SHA-512 produce longer digests (96 and 128 hex characters respectively) and offer a larger hash space, though all three SHA-2 variants are considered equally secure against known attacks.
SHA-1: Deprecated but Still Useful
SHA-1 produces a 160-bit (40-character hex) digest. While it has been deprecated for cryptographic security since Google demonstrated a practical collision attack in 2017 (the SHAttered project), SHA-1 is still widely used for non-security purposes like Git object hashing and checksum verification. This tool includes SHA-1 for convenience, but you should use SHA-256 or higher for any security-sensitive application.
Why No MD5?
MD5 is intentionally excluded from the Web Crypto API specification. MD5 has been cryptographically broken since 2004, and practical collision attacks can be performed in seconds on modern hardware. The Web Crypto API enforces security best practices by only exposing algorithms that meet minimum security standards. If you need MD5 for legacy compatibility, you will need a dedicated JavaScript library — but for any new project, use SHA-256.
Common Use Cases
Hash functions are used for data integrity verification (comparing file checksums), password storage (hashing passwords before storing them), digital signatures (signing a hash of a document rather than the document itself), content addressing (Git uses SHA-1 to identify commits and objects), and deduplication (comparing hashes to find duplicate files). This tool lets you quickly generate hashes for any of these use cases directly in your browser. For related security tools, try our Base64 Encoder, Password Generator, or UUID Generator.