Hash Generator

Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-512 hashes from text or files. Verify file checksums. Free online hash calculator and checksum generator

A hash function turns arbitrary bytes into a fixed-length digest that is cheap to compute and effectively impossible to invert. This generator runs MD5, SHA-1, SHA-256, SHA-384, SHA-512, and SHA-3 in your browser using the Web Crypto API where available and a vetted JS fallback for MD5 and SHA-1, which the platform deliberately omits. Inputs never reach a server, so you can verify checksums for confidential builds without worrying about exfiltration.

What "hash" actually means here

All algorithms exposed here are cryptographic hash functions in the Merkle–Damgård or sponge family. They are designed to satisfy three properties: pre-image resistance (given a digest, you cannot find the input), second-pre-image resistance (given input A, you cannot find a different B that hashes to the same digest), and collision resistance (you cannot find any two distinct inputs with the same digest). When you read that MD5 is "broken", what is actually broken is collision resistance — the other two properties still hold for almost all practical inputs.

This means MD5 and SHA-1 are still acceptable for non-adversarial integrity checks (download verification from a trusted mirror, deduplication, cache keys) but unacceptable for anything where an attacker chooses the input: certificates, signatures, content-addressable security boundaries.

Working example: the avalanche property

A good hash flips roughly half the output bits for any single-bit input change. Compare the SHA-256 digests of two inputs that differ in one character:

Input

eutils.pro
eutils.prO

Output

eutils.pro → 3f0d9b1e5b... (digest 1)
eutils.prO → c8a47e22f3... (completely different)

Diff one bit and ~50% of the output bits flip. This is the avalanche effect — it is why hashes cannot be reversed by guessing-and-checking gradually.

Pick the right algorithm

  • SHA-256 — default for everything in 2024+. Fast on modern CPUs (hardware-accelerated on x86 since 2016 and on ARM since v8.2-A), 256-bit output is wide enough that birthday collisions are infeasible.
  • SHA-512 — same family, larger state, often faster than SHA-256 on 64-bit hardware because the inner block processes 1024-bit chunks. Use when you want a wider digest without changing algorithm family.
  • SHA-3 (Keccak) — different construction (sponge), not vulnerable to length-extension attacks. Slower than SHA-2 in software, faster in hardware. Choose when you need length-extension resistance without using HMAC.
  • SHA-1 — only for legacy compatibility (git object IDs, old TLS certificates you are reading, not signing). Demonstrated collision since SHAttered in 2017.
  • MD5 — only for non-security uses: checksumming downloads, cache keys, dedup. Chosen-prefix collisions are routine. Never use for passwords or signatures.

When to reach for this tool

  • You downloaded an installer and want to verify it against the vendor's published SHA-256 checksum without installing extra software.
  • You are debugging why two "identical" JSON payloads produce different signatures — a quick hash comparison reveals trailing whitespace or BOMs you missed.
  • You need to produce a stable cache key from a string and want the digest in hex, base64, or base64url with one click.
  • You are validating that a backup tarball survived an FTP upload by comparing its SHA-256 to the original.

What this tool will not do

  • It will not hash passwords for storage. Use Argon2id, scrypt, or bcrypt — they are slow on purpose. Hashing a password with SHA-256 lets an attacker try billions of guesses per second per GPU.
  • It will not produce HMACs. An HMAC needs a secret key and a defined construction; this tool produces plain hashes. For HMAC-SHA-256 use a dedicated library or the Web Crypto API's SubtleCrypto.sign("HMAC", ...).
  • It will not check digital signatures. A signature is hash + private-key operation; verifying it needs the public key and signature algorithm metadata that a plain hasher does not see.

Everything runs in this browser tab using SubtleCrypto.digest where the algorithm is supported. You can hash company-confidential builds, internal certificates, or sensitive documents — no bytes leave your machine.

Frequently asked questions

Is SHA-256 of my password "good enough"?

No. SHA-256 is designed to be fast, and an attacker who steals your database wants to try billions of guesses per second. Use a password hash designed to be slow: Argon2id (preferred), scrypt, or bcrypt. They have tunable cost parameters so you can balance user-login latency against attack difficulty.

Why do different tools produce different MD5 hashes of the same string?

They are almost certainly hashing different bytes. The usual culprits: trailing newline in one tool but not the other, UTF-8 vs UTF-16 encoding, or a BOM at the start of one input. Hash the raw bytes you actually care about; if you are typing in a textarea, your browser typically uses UTF-8 with no BOM and no trailing newline.

Can two different files have the same SHA-256?

Mathematically yes, practically no. The output space is 2^256 ≈ 10^77. Even hashing every grain of sand on Earth, you would not expect a single accidental collision. No SHA-256 collision has been publicly demonstrated as of 2026.

What is the difference between SHA-512 and SHA-256?

Same algorithm family (SHA-2), different internal word size (64-bit vs 32-bit) and different number of rounds. SHA-512 produces a wider digest (512 bits) and is typically faster than SHA-256 on 64-bit CPUs that lack SHA-NI instructions. With SHA-NI, SHA-256 wins by 2-3x.

Is hashing a file the same as encrypting it?

No, and confusing the two is dangerous. A hash is one-way and produces a fixed-size digest; the original data cannot be recovered. Encryption is reversible with a key and produces ciphertext roughly the size of the input. Hashing protects integrity, encryption protects confidentiality.

Does this tool support hashing binary files, not just text?

Yes. Drop or select a file and the tool reads it as raw bytes — the resulting digest matches what sha256sum or shasum -a 256 produces on the command line.

Related tools

Last updated · E-Utils editorial team