/hash

Hash generator

Create MD5, SHA-1, SHA-256, SHA-384 and SHA-512 from text.

How it works

A hash is a fixed “fingerprint” of the input. The SHA functions use the browser’s built-in Web Crypto, while MD5 is computed by a small library. MD5 and SHA-1 are considered insecure for cryptography but remain useful for checksums.

About this tool

Cryptographic hash functions turn arbitrary text or files into a fixed-length "fingerprint" of hexadecimal characters. The same input always produces the same hash, while the tiniest change produces a completely different value. This tool computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 of your text directly in the browser, nothing is sent to a server. Use it to verify a downloaded file is uncorrupted, compare two strings without revealing their contents, or generate stable identifiers for caching.

How to use it

  1. Paste or type the text you want to hash.
  2. The tool computes all hash variants simultaneously and shows them as hexadecimal strings.
  3. Press "Copy" next to the chosen algorithm to put the hash on your clipboard.
  4. For file hashing, use "File to base64" + this tool, or compare with a command-line tool (`sha256sum`, `certutil`).

Examples

SHA-256 of "hello"
Inputhello
Output2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Change one letter
InputHello
Output185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
Notice how one uppercase letter produces a completely different hash. This is called the "avalanche effect" and is a desired property of secure hash functions.

Common use cases

  • Checksums for file downloads (verifying an `.iso` or `.zip` was not corrupted).
  • Content-based cache keys (same input → same key).
  • Signing API requests (HMAC-SHA-256).
  • Git checksums, every commit is identified by a SHA-1 hash.
  • HTTP ETag headers for conditional GET requests.
  • Verifying that a piece of text has not changed since an earlier measurement.

Frequently asked questions

Can I reverse-engineer the text from a hash?
No, hash functions are one-way. But *short* or *common* inputs can be guessed with rainbow tables or brute force. That is why passwords should never be hashed with a "raw" algorithm; use bcrypt, scrypt, Argon2 or PBKDF2 with a salt.
Are MD5 or SHA-1 still safe?
No, not for security-critical purposes. Both have practical collision attacks (Google demonstrated a SHA-1 collision in 2017). Use at least SHA-256 for signatures and integrity checks. MD5/SHA-1 are OK for non-security purposes such as cache keys.
Why should I use a salt when hashing passwords?
A salt is random bytes added to the password before hashing, unique per user. It prevents identical passwords from producing identical hashes, defeats rainbow tables, and forces attackers to crack each password separately.

Technical background

The SHA-2 family (SHA-256, SHA-384, SHA-512) is standardised in NIST FIPS 180-4 and produces 256-, 384- and 512-bit outputs respectively. The browser computes these via the Web Crypto API (`crypto.subtle.digest`), which is natively implemented and hardware-accelerated on modern CPUs. MD5 (RFC 1321, 128 bit) has been broken for collisions since 2004; SHA-1 (RFC 3174, 160 bit) has been broken since 2017. More recent alternatives include SHA-3 (Keccak, FIPS 202) and BLAKE2/BLAKE3 for higher performance.