Hash Generator

Compute MD5, SHA-1, SHA-256, SHA-384 and SHA-512 for text or a file in one go, then paste an expected checksum to see which algorithm matches.

Generator Web & Dev Updated Oct 3, 2026
Learn how this works
How to Use
  1. Type or paste text, or drop a file (up to 256 MB). All five hashes are worked out together and update as you type.
  2. Choose the output style: lowercase hex (as sha256sum prints it), UPPERCASE hex (as Windows certutil prints it) or Base64 (as Subresource Integrity uses it).
  3. To check a download, paste the publisher’s checksum into Expected hash. The matching row turns green and the readout names the algorithm.
  4. Press Copy on any row for that hash, or Copy all for all five.
  5. Read the padded block and Show Work to see how many bytes and blocks went into each digest.
Input
hashed as UTF-8
#
Or drop a file to hash it (up to 256 MB)
optional: hex, Base64 or sha384-…
Presets
Hashes
MD5—
SHA-1—
SHA-256—
SHA-384—
SHA-512—
The padded block appears here.
Bytes in
—
SHA-256 blocks
—
Time
—
Match
—

Worked Example

Hash the three letters “abc”, the official test vector in the SHA standard.

Bytes: a = 61, b = 62, c = 63 (hex), so n = 3 bytes = 24 bits.
Padding for MD5, SHA-1 and SHA-256 (64-byte blocks): the 3 bytes, then the marker byte 80, then 52 zero bytes, then the length 24 as an 8-byte number (00 00 00 00 00 00 00 18). 3 + 1 + 52 + 8 = 64 bytes, so ⌊(3 + 8) / 64⌋ + 1 = 1 block.
SHA-384 and SHA-512 use 128-byte blocks and a 16-byte length: 3 + 1 + 108 + 16 = 128, again 1 block.
Results:
MD5 = 900150983cd24fb0d6963f7d28e17f72 (128 bits, 32 hex characters)
SHA-1 = a9993e364706816aba3e25717850c26c9cd0d89d (160 bits, 40 hex)
SHA-256 = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad (256 bits, 64 hex)

The common mistake: hashing on the command line with echo abc | sha256sum. echo adds a newline, so 4 bytes (61 62 63 0A) are hashed and the result is edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb, not ba7816bf…. Use printf abc or echo -n abc. Windows line endings (0D 0A) cause the same surprise when a text file is hashed on two systems.

Show Work

Type something or drop a file to see the bytes, padding and blocks behind each hash.

Formulas

Blocks (MD5, SHA-1, SHA-256)
B = ⌊(n + 8) / 64⌋ + 1
n bytes, 1 marker byte, 8-byte length
Blocks (SHA-384, SHA-512)
B = ⌊(n + 16) / 128⌋ + 1
128-byte blocks, 16-byte length
Digest sizes
128 · 160 · 256 · 384 · 512 bits
MD5, SHA-1, SHA-256, SHA-384, SHA-512
Hex length
chars = bits / 4
32, 40, 64, 96 and 128 characters
Base64 length
chars = 4 × ⌈bytes / 3⌉
SHA-384: 48 bytes → 64 characters (SRI)
Collision effort
≈ 2bits / 2 tries
Birthday bound: 2128 for SHA-256

From MD5 to SHA-2

Ron Rivest published MD5 in 1992 (RFC 1321) and it became the checksum of the 1990s. The US National Security Agency designed SHA-1, standardised by NIST in 1995 (FIPS 180-1), and the SHA-2 family — SHA-256, SHA-384 and SHA-512 — followed in 2001.

In 2004 Xiaoyun Wang’s team showed how to make two different inputs with the same MD5, and in 2008 researchers used MD5 collisions to forge a working certificate authority. SHA-1 fell in February 2017 when Google and CWI Amsterdam published SHAttered: two different PDF files with one SHA-1. SHA-2 has no known practical attack, and SHA-3 (FIPS 202, 2015), built on the different Keccak design, stands by as a reserve. Browsers gained native hashing through the Web Crypto API, a W3C Recommendation since January 2017; it deliberately offers no MD5, so this page computes MD5 in JavaScript.

About This Tool

This tool hashes text (as UTF-8 bytes) or a file with five algorithms at once, and shows each digest as lowercase hex, uppercase hex or Base64. Paste an expected checksum and it finds which algorithm, if any, produced it — useful when a download page does not say whether a value is SHA-1 or SHA-256.

SHA-1 and the SHA-2 hashes come from the browser’s Web Crypto API, which only works on secure (HTTPS) pages; MD5 is computed by this page’s own code. Files up to 256 MB are read into memory once. Nothing is uploaded: text and files stay on your device.

Related tools: Batch File Hasher, Checksum Verifier, and SHA-256 Hash Generator.

Frequently Asked Questions

Which hash should I use?

SHA-256 for anything new: file checksums, content addresses, signatures. SHA-384 and SHA-512 are just as safe and often faster on 64-bit processors. MD5 (2004) and SHA-1 (2017) have practical collision attacks, so use them only to catch accidental corruption or when an older system asks for them.

Why does one changed character change the whole hash?

Good hash functions are built so that every output bit depends on every input bit (the avalanche effect). “The quick brown fox jumps over the lazy dog” has the MD5 9e107d9d372bb6826bd81d3542a419d6; add a full stop and it becomes e4d909c290d0fb1ca068ffaddf22cbd0, with no visible pattern between them.

Can I use these to store passwords?

No. MD5 and SHA hashes are designed to be fast, so a stolen table of them can be attacked with billions of guesses per second on a graphics card. Passwords need a slow, salted function made for the job: Argon2id, bcrypt or scrypt.

How big a file can I hash here?

Up to 256 MB. The file is read into memory once; the SHA hashes use the browser’s built-in Web Crypto, which takes the whole file in one call, and MD5 runs in 4 MB steps so the page stays responsive. For bigger files use sha256sum file on Linux and macOS, or Get-FileHash file in PowerShell.

How do I check a download’s checksum?

Drop the file, then paste the published value into Expected hash. Plain hex, a sha256sum line (“hash filename”), a sha256: prefix and an SRI value such as sha384-ywB1P0Wj… all work. A green row means every byte matches; “no match” means the file differs, even by one bit.

How do I use the Hash Generator?

Simply pick your options and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

Verifying a download

Compare an installer’s SHA-256 with the publisher’s 64-character checksum before running it.

Subresource Integrity

Make the integrity="sha384-…" value for a script tag: Base64 of the 48-byte SHA-384 digest, 64 characters long.

Spotting a trailing newline

echo abc | sha256sum hashes 4 bytes, not 3, and gives edeaaff3… instead of ba7816bf…. Paste both here to see why.

Duplicate files

Two files with the same SHA-256 are, for all practical purposes, identical: a chance collision needs about 2128 files.

Cache keys and ETags

Use a content hash as a cache key, so the same bytes always map to the same 32- or 64-character name.

Last updated: