ToolBook
Support us on Ko-fi
Help us keep this free, forever

Hash Generator

How to generate and verify hashes online

Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text or a file and verify checksums instantly.

  1. Enter text or drop a file

    Type or paste text into the input area, or drag-and-drop a file to compute hashes from file bytes.

  2. Read the hashes

    All five algorithms (MD5, SHA-1, SHA-256, SHA-384, SHA-512) are computed simultaneously and displayed in rows with their bit lengths.

  3. Toggle uppercase if needed

    Switch to uppercase to get capital hex output. Some systems (Windows CertUtil, for example) display hashes in uppercase.

  4. Verify against an expected checksum

    Paste a known hash into the verify field to instantly confirm which algorithm produced it. The matching row highlights green.

  5. Copy any hash

    Click the copy icon next to any algorithm row to copy just that digest to your clipboard.

Frequently asked questions

What is a hash function?

A hash function takes input of any size and produces a fixed-size output (the hash or digest). The same input always produces the same hash. A tiny change in input produces a completely different hash. Hashes are one-way: you cannot reverse them to recover the original input.

Which algorithm should I use?

Use SHA-256 or SHA-512 for any security-sensitive purpose. They are cryptographically strong and widely trusted. SHA-384 is also SHA-2 family and is the default in TLS 1.3 cipher suites. SHA-1 is deprecated for security use but still seen in legacy systems. MD5 should not be used for password storage or digital signatures but remains useful for file integrity checksums in non-adversarial settings.

What is SHA-384 and when should I use it?

SHA-384 is part of the SHA-2 family and produces a 384-bit (96 hex character) digest. It is used in TLS 1.3 cipher suites (ECDHE-ECDSA-AES256-GCM-SHA384) and in some government and compliance frameworks that require more than 256 bits. For most applications, SHA-256 is sufficient. SHA-384 is the right choice when your target system or specification explicitly requires it.

Is this tool safe for password hashing?

No. MD5, SHA-1, SHA-256, SHA-384, and SHA-512 are fast hash functions, which makes them easy to brute-force for passwords. Use a slow, salted password hash like bcrypt, Argon2, or PBKDF2 for storing passwords.

Can I verify a file download with this tool?

Yes. Drop the file into the upload zone and paste the checksum published by the software vendor into the verify field. The tool highlights the matching algorithm in green instantly. If the SHA-256 values match exactly, the file was not tampered with or corrupted in transit.

How do I compare hashes using this tool?

After hashing your text or file, paste the expected hash into the verify field below the results. The tool checks it against all five algorithms simultaneously and highlights the matching row in green. If no row matches, the file or text differs from what produced the original hash.

What is HMAC and when do I need it?

HMAC (Hash-based Message Authentication Code) is a hash computed over your message combined with a secret key. It proves both integrity (the message was not altered) and authenticity (the sender knows the secret). APIs like AWS, Stripe, and GitHub webhooks use HMAC-SHA256 to sign requests. This tool computes plain hashes without a key. For HMAC, use your language runtime: Node `crypto.createHmac`, Python `hmac`, or Go `crypto/hmac`.

What is the difference between SHA-2 and SHA-3?

SHA-2 (SHA-256, SHA-384, SHA-512) and SHA-3 (SHA3-256, SHA3-512) are both NIST-approved but use completely different internal designs. SHA-2 uses a Merkle-Damgard construction; SHA-3 uses a sponge construction (Keccak). SHA-3 was standardised in 2015 as a backup in case SHA-2 was broken, but SHA-2 remains strong today. Most systems still use SHA-2.

Is my data sent to a server?

No. All hashing runs in your browser. MD5 is computed with a built-in TypeScript implementation, and SHA variants use the browser native Web Crypto API. Nothing is uploaded.

Why does MD5 produce a shorter hash than SHA-256?

MD5 produces a 128-bit (32 hex character) digest. SHA-1 produces 160 bits (40 chars). SHA-256 produces 256 bits (64 chars). SHA-384 produces 384 bits (96 chars). SHA-512 produces 512 bits (128 chars). Longer digests are harder to find collisions for: SHA-512 has 2512 possible outputs.

MD5, SHA-1, SHA-256, SHA-384, SHA-512: when to use each and why MD5 is still useful

Hash functions explained from first principles: collision resistance, avalanche effect, and the right algorithm for each use case.

What a hash function does

A cryptographic hash function takes an input of any length and produces a fixed-length output (the digest or hash). Three properties define a secure hash function:

  1. Deterministic: the same input always produces the same hash.
  2. Pre-image resistant: given a hash, it is computationally infeasible to find the original input.
  3. Collision resistant: it is computationally infeasible to find two different inputs that produce the same hash.

A fourth property — the avalanche effect — means that a single-bit change in the input completely changes the output. "hello" and "hellO" produce entirely different SHA-256 hashes.

MD5: still useful, just not for security

MD5 (Message Digest 5) produces a 128-bit (32 hex character) digest. It was designed in 1991 and is fast — around 500 MB/s on modern hardware.

The problem: collision attacks against MD5 have been known since 2004. Two different files can be crafted to produce the same MD5 hash. This makes MD5 unsuitable for digital signatures, certificate fingerprinting, or any adversarial context.

Where MD5 is still fine:

  • Checksums for non-adversarial integrity checking — verifying a downloaded file matches what the server sent over HTTPS (where the channel integrity is already guaranteed by TLS)
  • Non-security deduplication — detecting duplicate files in a storage system
  • Cache keys and sharding — fast hash-based partitioning where collision attacks are not a concern

SHA-1: deprecated but ubiquitous

SHA-1 produces 160-bit (40 hex character) digests. Git still uses SHA-1 as its object identifier by default. TLS certificates were required to stop using SHA-1 for signatures by 2017 after a practical collision (SHAttered) was demonstrated by Google researchers.

Like MD5, SHA-1 is acceptable for non-adversarial integrity checks but should not be used for new security code.

SHA-256, SHA-384, and SHA-512: the current standard

SHA-256 (256 bits, 64 hex chars), SHA-384 (384 bits, 96 hex chars), and SHA-512 (512 bits, 128 hex chars) are all part of the SHA-2 family and remain cryptographically strong. No practical attacks against any of them are known.

Use SHA-256 for:

  • API request signing (HMAC-SHA256 is the standard for AWS, Stripe, Twilio, and most modern APIs)
  • File integrity manifests
  • Digital certificates (TLS 1.3 mandates SHA-256 or stronger)

Use SHA-384 when:

  • Your target specification or compliance framework explicitly requires it (common in TLS 1.3 cipher suites like ECDHE-ECDSA-AES256-GCM-SHA384)
  • The system you are integrating with mandates a 384-bit digest

Use SHA-512 when:

  • The platform performs 64-bit arithmetic natively (SHA-512 is faster on 64-bit hardware than SHA-256 per byte)
  • Extra margin is desired for very long-lived signatures

Hash functions vs password hashing

MD5, SHA-1, SHA-256, and SHA-512 are fast by design. Speed is excellent for checksums. It is catastrophic for password hashing — a modern GPU can compute billions of SHA-256 hashes per second, making brute-force attacks trivially fast.

For passwords, use a slow algorithm: bcrypt, scrypt, Argon2, or PBKDF2. These are intentionally slow and include a work factor you can tune upward as hardware improves. Never store passwords as SHA-256("password") — that hash appears in every rainbow table ever built.