Not available for CRC-8.
Hash Calculator
calculation / hash Hash Calculator
Generate hash values for text or files using any of fourteen algorithms — MD5, SHA-1, the SHA-2 and SHA-3 families, RIPEMD-160, and CRC-8, CRC-16, and CRC-32 checksums. Paste text or attach a file, pick an algorithm, and the digest appears immediately as hexadecimal or Base64. Paste a published checksum to verify a download, compute a keyed HMAC with a shared secret, or compare every algorithm side by side. Everything runs in your browser: your input is never uploaded, stored, or logged, so it is safe to hash confidential documents.
Supported algorithms
Fourteen algorithms in three families: the SHA-2 family from FIPS 180-4, the SHA-3 family from FIPS 202, and three CRC checksums whose polynomials come from ISO/IEC 13239. The digest length determines how many characters you see — a hexadecimal digest has one character per four bits, so SHA-256 prints 64 and MD5 prints 32. That alone identifies which algorithm produced an unknown hash.
| Algorithm | Bits | Hex chars | Standard | Status | Notes |
|---|---|---|---|---|---|
| CRC-8 | 8 | 2 | ISO/IEC 13239 | Checksum only | SMBus polynomial. Error detection in short frames. |
| CRC-16 | 16 | 4 | ISO/IEC 13239 | Checksum only | ARC variant. Modbus, USB, many embedded links. |
| CRC-32 | 32 | 8 | ISO/IEC 13239 | Checksum only | ISO-HDLC. Ethernet frames, ZIP archives, PNG chunks. |
| MD5 | 128 | 32 | RFC 1321 | Broken | Collisions in seconds on ordinary hardware. Non-security use only. |
| SHA-1 | 160 | 40 | FIPS 180-4 | Broken | Practical collision demonstrated in 2017 (SHAttered). |
| RIPEMD-160 | 160 | 40 | ISO/IEC 10118-3 | No practical attack | Used in Bitcoin address derivation. |
| SHA2-224 | 224 | 56 | FIPS 180-4 | Secure | Truncated SHA-256, distinct initial values. |
| SHA2-256 | 256 | 64 | FIPS 180-4 | Secure | The sensible default. Widest support. |
| SHA2-384 | 384 | 96 | FIPS 180-4 | Secure | Truncated SHA-512. Common in TLS suites. |
| SHA2-512 | 512 | 128 | FIPS 180-4 | Secure | Often faster than SHA-256 on 64-bit hardware. |
| SHA3-224 | 224 | 56 | FIPS 202 | Secure | Keccak sponge construction. |
| SHA3-256 | 256 | 64 | FIPS 202 | Secure | Structurally unlike SHA-2; unaffected by an SHA-2 break. |
| SHA3-384 | 384 | 96 | FIPS 202 | Secure | Keccak with a 384-bit output. |
| SHA3-512 | 512 | 128 | FIPS 202 | Secure | Largest digest offered here. |
Worked examples
The digests below are the published test vectors from FIPS 180-4 and RFC 1321. Hashing the same input in this tool must reproduce them exactly — that is a useful check that any hash implementation, including this one, is behaving.
| Algorithm | Input | Digest |
|---|---|---|
| MD5 | "abc" | 900150983cd24fb0d6963f7d28e17f72 |
| SHA-1 | "abc" | a9993e364706816aba3e25717850c26c9cd0d89d |
| SHA2-256 | "abc" | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
| SHA2-256 | empty string | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
The empty-string digest is worth memorising the first few characters of. e3b0c442… appearing where you expected real content is the signature of a file that failed to read, an empty buffer, or a variable that was never assigned.
What is a hash function?
A hash function takes input of any size and produces a fixed-length string of characters — the hash, or digest. Hash "hello" with SHA-256 and you get 64 hexadecimal characters. Hash an entire film with the same algorithm and you still get 64 characters. The output looks random but is completely deterministic: the same input always produces the same hash, on any machine, in any programming language, forever.
Two other properties make hashes useful. They are one-way — given a hash, there is no practical way to recover the original input. And a good hash function has the avalanche property: change a single character of the input and roughly half the output bits flip. There is no partial similarity, so you cannot tell from two hashes whether their inputs were nearly identical.
Checksums versus cryptographic hashes
The two groups in the table above serve genuinely different purposes, and confusing them is a real mistake.
Checksums (CRC-8, CRC-16, CRC-32)
CRC stands for Cyclic Redundancy Check. These are designed to catch accidental corruption — a flipped bit from a bad cable, a truncated download, a scratched disc. They are fast and short, and they are used in Ethernet frames, ZIP archives, and PNG files. They are not secure: forging a different input with the same CRC is trivial, so never use one to verify that a file has not been tampered with deliberately.
Cryptographic hashes (MD5, SHA, RIPEMD)
These are built so that finding two inputs with the same hash is computationally infeasible. That makes them suitable for verifying downloads against a published digest, storing password verifiers, generating content addresses, and signing data.
Which algorithm should you use?
- SHA-256— the sensible default. Widely supported, thoroughly analyzed, and with no known practical weaknesses. If you are unsure, use this.
- SHA-512— a larger digest, and often faster than SHA-256 on 64-bit hardware because it operates on 64-bit words.
- SHA-3 family— a structurally different design (Keccak) selected by NIST in 2012. Its value is diversity: it would not fall to an attack that broke SHA-2.
- MD5— cryptographically broken. Collisions can be produced in seconds on a laptop. Still fine as a fast non-security checksum or cache key, but never for signatures, certificates, or integrity against an attacker.
- SHA-1— also broken. A practical collision was demonstrated in 2017, and browsers and certificate authorities have retired it. Treat it as legacy only.
- RIPEMD-160— a 160-bit digest developed in Europe, still used in Bitcoin address derivation.
- CRC-32— error detection only, never security.
Common uses
- Verifying downloads— projects publish a SHA-256 digest next to a release. Hash the file you received and compare. If the strings match exactly, your copy is byte-identical.
- Detecting duplicate files— identical hashes mean identical content, regardless of filename or timestamp.
- Confirming a transfer— hash a file before and after copying it across a network or onto external storage.
- Cache keys and content addressing— a digest makes a compact, unique identifier for a blob of data.
- Comparing configuration— hash two config files to see instantly whether they differ at all.
How much collision resistance a digest buys
Because inputs are unlimited and outputs are fixed, collisions must exist. What matters is how much work finding one takes. The birthday bound says an n-bit digest resists collision search to roughly 2n/2 operations, not 2n — half the bits, in the exponent.
So SHA-256 offers 128 bits of collision resistance, and MD5 offers 64 — which was already uncomfortable before its structural weaknesses reduced the real figure far below that. This is also why a 32-bit CRC is no security control at all: 216 is about 65,000 operations.
The same arithmetic governs truncation. Cutting a SHA-256 digest to its first 16 hexadecimal characters leaves 64 bits, and therefore 32 bits of collision resistance — roughly four billion operations, which is minutes of work. NIST SP 800-107r1 sets out when truncation is acceptable and how much security remains; the short answer is that a shortened digest is a shortened digest, not a compact one.
Why none of these belong in password storage
Hashing passwords with a plain function like SHA-256 is not secure, even though it is a strong algorithm. The problem is speed: SHA-256 is designed to be fast, so an attacker with a stolen database can test billions of candidate passwords per second on a GPU. The property that makes a hash good for file integrity is exactly what makes it bad here.
Verifying a download
This is the most common everyday use. A project publishes the SHA-256 of its installer; you hash the file you downloaded and compare. Rather than squinting at sixty-four characters, paste the published value into the Verify field and the tool reports a match or a mismatch. The comparison ignores case and surrounding whitespace, since published checksums are formatted inconsistently.
A mismatch means the bytes differ from what the publisher hashed — a truncated download, the wrong version, or in the worst case a tampered file. Note that this proves the file matches the checksum, not that the checksum itself is trustworthy: if an attacker controls the page showing both, they control both.
HMAC: hashing with a key
A plain hash proves a message has not changed; anyone can recompute it. An HMAC additionally proves who computed it, because reproducing the value requires a shared secret key. This is what signs webhook payloads and API requests — Stripe, GitHub and AWS all send an HMAC alongside the request so the receiver can confirm it came from the expected sender.
Enable Use a secret key in the configuration panel and supply the key. HMAC is available for MD5, RIPEMD-160, SHA-1 and the SHA-2 family. It is not offered for the CRC checksums, which have no key, nor for SHA-3 in this tool. Changing a single character of the key changes the entire result, which is the point.
HMAC is defined in RFC 2104 and FIPS 198-1. Its construction — hashing the key twice, with two different pads, around the message — is what makes it safe even on hash functions vulnerable to length-extension. That is why HMAC-MD5 remains unbroken despite MD5 itself being collidable: the attacks that break MD5 collisions do not carry over. RFC 6151 nonetheless advises against new deployments.
Output formats
Digests are shown as hexadecimal by default, optionally uppercase — some tools print ff and others FF for the same value, and neither is more correct. Base64 output is more compact and is what HTTP headers such as Content-Digest and Subresource Integrity attributes use. The All Algorithms table computes every supported digest of the current input at once, which is useful when you have a hash but do not know which algorithm produced it: match the length first, then compare.
Frequently asked questions
Why does a file hash differently here than in my terminal?
sha256sum and equivalent tools do. The usual explanation is a trailing newline: a file created by an editor almost always ends with one, whereas text pasted into the box above usually does not, and that single byte changes the digest completely.Can a hash be reversed?
Why do two different files sometimes share a hash?
Does the same input always give the same hash?
Why does adding one character change the whole hash?
Is my input uploaded anywhere?
Standards and references
- FIPS 180-4 Secure Hash Standard (SHS) — SHA-1, SHA-224, SHA-256, SHA-384, SHA-512 2015
- FIPS 202 SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions 2015
- RFC 1321 The MD5 Message-Digest Algorithm 1992
- RFC 2104 HMAC: Keyed-Hashing for Message Authentication 1997
- FIPS 198-1 The Keyed-Hash Message Authentication Code (HMAC) 2008
- RFC 6151 Updated Security Considerations for the MD5 Message-Digest and HMAC-MD5 Algorithms 2011
- NIST SP 800-107r1 Recommendation for Applications Using Approved Hash Algorithms 2012
- NIST SP 800-63B Digital Identity Guidelines: Authentication and Lifecycle Management 2017
- Stevens et al. The First Collision for Full SHA-1 (CRYPTO 2017) 2017
- ISO/IEC 13239High-level data link control (HDLC) procedures — the CRC-32 polynomial 2002