Hash Generator
Compute MD5, SHA-1, SHA-256, SHA-384, SHA-512 hashes in real time. Client-side only.
Generate cryptographic hashes from any text — select SHA-256, SHA-512, SHA-1, SHA-384, or MD5, then type or paste your input and the hash appears instantly. SHA algorithms use the browser's Web Crypto API; MD5 uses spark-md5 in-browser. Empty input shows a placeholder instead of an empty-string hash, preventing accidental confusion. Zero server requests.
SHA-256 — Web Crypto API, runs entirely in your browser.
How to generate a cryptographic hash
- 1
Select an algorithm
Choose from SHA-256, SHA-512, SHA-1, SHA-384, or MD5. For security purposes (integrity checks, digital signatures) prefer SHA-256 or SHA-512. MD5 is suitable only for non-security checksums.
- 2
Type or paste your input
Enter any text in the input field — the hash digest updates on every keystroke in real time. SHA algorithms use the browser's SubtleCrypto.digest(); MD5 uses spark-md5 entirely in-browser.
- 3
Copy the hash output
Click the Copy button to copy the hex-encoded digest to your clipboard. The output is a lowercase hexadecimal string ready to paste into code, a terminal, or a comparison tool.
- 4
Verify or compare
To verify file integrity, hash the file content with the same algorithm used by the provider, then compare the two hex strings character by character. Even a one-bit difference in input produces a completely different digest.
Hash Generator FAQ
- What is the difference between SHA-256 and MD5?
- SHA-256 produces a 256-bit digest and is collision-resistant, making it suitable for integrity verification, digital signatures, and TLS. MD5 produces a 128-bit digest and is cryptographically broken — collisions can be engineered. Use MD5 only for non-security purposes such as checksums for accidental corruption.
- Which hash algorithm should I use?
- For security purposes (passwords, signatures, integrity), choose SHA-256 or SHA-512. SHA-384 is used in TLS 1.3 cipher suites. SHA-1 is deprecated for most uses since 2017. MD5 is suitable only for non-security checksums or legacy systems that require it.
- How do I generate an SHA-256 hash online?
- Select SHA-256 in the algorithm selector above, type or paste your text, and the digest appears instantly. Click Copy to grab the hex-encoded hash.
- Is the MD5 hash generator accurate?
- Yes. MD5 is computed by the spark-md5 library running entirely in your browser. The output matches standard MD5 implementations — for example, MD5('hello') = 5d41402abc4b2a76b9719d911017c592.
- Can I hash a file with this tool?
- This tool hashes text input. For file hashing, use the sha256sum / md5sum command-line utilities, or a dedicated file hash tool. File hashing in-browser is possible with the File API — it may be added in a future version.
- What is the output length of each hash algorithm?
- MD5 produces 128 bits (32 hex chars), SHA-1 produces 160 bits (40 hex chars), SHA-256 produces 256 bits (64 hex chars), SHA-384 produces 384 bits (96 hex chars), and SHA-512 produces 512 bits (128 hex chars). Longer digests offer higher collision resistance.
References
- FIPS 180-4 Secure Hash Standard (SHA)
The NIST standard defining SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 — the authoritative specification for all SHA family algorithms used in this tool.
- RFC 1321 — The MD5 Message-Digest Algorithm
The original IETF specification for MD5 published by RSA Data Security. Useful as a reference; note that MD5 is cryptographically broken for security applications.
- MDN — SubtleCrypto.digest()
Browser-native Web Crypto API method used by this tool to compute SHA-1, SHA-256, SHA-384, and SHA-512 digests without any server requests.
Related developer tools
UUID Generator
Generate RFC-compliant UUID v4 or v7 identifiers in bulk — often used alongside hashes for unique resource identifiers.
Password Generator
Generate cryptographically random passwords with configurable length and character sets — pair with a hash tool to verify storage output.
Base64 Encode / Decode
Encode binary data or hash bytes to Base64 — common when embedding digests in HTTP headers or JSON payloads.
JWT Decoder
Decode a JWT and inspect the hashing algorithm (HS256, RS256) used in the signature section.