Hash Generator

Crypto

Generate SHA-1/256/384/512 hashes from text with hex output, plus MD5 and RIPEMD-160. Switch between hex and Base64 output, then compare against a published.

Ready
Text to hash
0 chars
Digests
MD5— type something above to get hashes —
CRC32— type something above to get hashes —
SHA-1— type something above to get hashes —
SHA-256— type something above to get hashes —
SHA-384— type something above to get hashes —
SHA-512— type something above to get hashes —

About Hash Generator

A hash function maps input of any length to a fixed-length digest, commonly used to verify file integrity, store password fingerprints, and generate deduplication keys. This tool computes SHA-1, SHA-256, SHA-384, and SHA-512 via the browser Web Crypto subtle.digest, and also supports MD5 and RIPEMD-160 for legacy systems. For example the string hello yields the SHA-256 digest 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Input text is processed only locally and is never uploaded.

How to Use

  1. Open the Hash Text tool
  2. Paste the text to hash in the input field
  3. Automatically computes and displays MD5, SHA-1, SHA-256, SHA-512, and more
  4. Supports file hashing: switch to File mode and upload a file
  5. Click the copy button next to any hash value

Use Cases

  • File integrity check — Compare a downloaded file's SHA-256 against the publisher's announced value to confirm it has not been tampered with.
  • Password preprocessing — Useful with a salt, but for password storage prefer bcrypt (see our Bcrypt Hash tool).
  • Git commit verification — Git identifies commits by SHA-1; this tool lets you manually recompute and verify a commit's content hash.
  • API request signing — Combine with HMAC (see our HMAC Generator) to produce signed API requests.
  • Deduplication and cache keys — Use a content hash as a cache key — identical content stores only once.
  • File integrity verification — Compute SHA-256 hashes of downloaded files and compare against the publisher's checksum to detect corruption or tampering.
  • Avalanche effect demo — Demonstrate how even a single-character change in input produces a completely different hash output for educational purposes.

FAQ

Is SHA-1 still safe?

Not for cryptographic purposes (Google demonstrated a collision in 2017), but it remains acceptable for non-adversarial uses like checksums and Git commit IDs.

SHA-256 vs SHA-512 — which is safer?

Both are secure. SHA-512 outputs longer hashes (128 hex chars vs 64) but is slightly slower. SHA-256 is sufficient for nearly all use cases.

Why no MD5?

MD5 was broken in 2004 (Wang Xiaoyun et al.) and should not be used in any new code. Modern browsers also no longer expose MD5 in Web Crypto API.

Will the same input always produce the same hash?

Yes. Hash functions are deterministic — the same input always yields the same output, which is exactly why they work for verification.

Can I reverse a hash back to the original text?

No. Hashes are one-way. However, short or weak inputs are vulnerable to dictionary or rainbow-table attacks — which is why password storage uses bcrypt + salt.

Why does the same password hash differently each time?

Because a salt was added. Hashing itself is deterministic, but password schemes generate a random salt per registration and hash it together with the password, so identical passwords produce different digests — defeating rainbow tables and same-password linkage. The salt is stored with the hash (e.g., bcrypt's salt prefix) and reused on verify. If results differ and the format shows no salt, the likely cause is a byte-level mismatch like differing encoding or a trailing newline, so normalize to UTF-8 and retry.

Why does the same text hash differently across tools?

Usually an encoding or whitespace difference: UTF-8 vs UTF-16, capitalization, a trailing newline, or leading/trailing spaces all alter the bytes fed to the hash and therefore the digest. For example a file saved in Windows Notepad may carry a BOM or CRLF line endings, which differ byte-for-byte from Linux LF. Inspect the input as hex to confirm the bytes are identical, then normalize to UTF-8 with LF newlines — every tool then returns the same digest.

Advertisement