Skip to content

Hash Generator: SHA-256, SHA-512, MD5 & CRC32 Online

Hash generator for SHA-256, SHA-512, SHA-384, SHA-1, MD5, and CRC32. Hash text or a file and compare it against a published checksum. Runs locally.

By Updated Runs in your browser

Hash Generator guide

Generate SHA hashes of any text as you type, or drop in a file to verify a download against the checksum its publisher lists. All six are computed at once: the SHA family with the browser's Web Crypto API, MD5 and CRC32 with small built-in implementations for matching legacy checksums.

What a hash function does

A cryptographic hash function takes any amount of data, from one byte to a 50 GB disk image, and produces a short fixed-length output. SHA-256 always returns 256 bits, written as 64 hexadecimal characters. Three properties make it useful: the same input always gives the same output, a tiny change in the input scrambles the whole output, and there is no practical way to work backward from the output to the input or to find two inputs with the same output.

This page uses the browser's Web Crypto API (crypto.subtle.digest), the same implementation the browser uses for TLS, for the SHA family. Web Crypto leaves out MD5 and CRC32 on purpose, so those two come from small implementations bundled with the page and checked against the published test vectors (the MD5 of an empty input is d41d8cd98f00b204e9800998ecf8427e). Text is converted to UTF-8 bytes first, which is the encoding almost every other tool and language uses by default.

Worked example: one letter, a different fingerprint

The SHA-256 of hello is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Capitalize the H and it becomes 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969. No shared pattern, no partial match. That avalanche effect is why hashes catch any corruption or tampering, no matter how small.

Try it the classic wrong way on a terminal: echo hello | shasum -a 256 gives a different result, 5891b5b5..., because echo adds a newline byte. echo -n hello matches the value above. Invisible characters are the number one reason two tools disagree.

Verifying a download

Software publishers list a SHA-256 checksum next to installers and disk images: Ubuntu, Python, Node.js, and most open-source projects do. After downloading, choose the file here and paste the published checksum into the compare box. A match means the file is byte-for-byte what the publisher hashed. A mismatch means a corrupted download or a tampered file, so delete it and download again from the official site.

Files are read and hashed locally, so even a large ISO never leaves your machine. On very large files (several GB), the command line is faster and uses less memory: shasum -a 256 file on macOS, sha256sum file on Linux, and Get-FileHash file in Windows PowerShell, which defaults to SHA-256.

A checksum only proves the file matches the checksum you compared it with. If an attacker controls the download page, they can change both. For high-stakes software, prefer checksums published on a separate channel, or signed releases verified with GPG or Sigstore, which prove who produced the file, not just that it arrived intact.

Choosing an algorithm

SHA-256 is the default choice. It is part of the SHA-2 family standardized by NIST in FIPS 180-4, it is what Git's newer object format, Bitcoin, TLS certificates, and AWS request signing use, and there are no known practical attacks.

SHA-384 and SHA-512 are the longer SHA-2 variants. They are just as trustworthy and often faster than SHA-256 on 64-bit processors. SHA-1 is legacy: researchers produced a real collision in 2017 (the SHAttered attack), so it should not be used where an attacker could supply the input. It is included because older systems, like classic Git commit IDs, still display it. MD5 is broken worse still: collisions take seconds on a laptop. It is here only because many older download pages still publish MD5 checksums. CRC32 is not a cryptographic hash at all; zip files and Ethernet use it to catch accidental bit flips, and anyone can forge a matching CRC32 on purpose.

Passwords need a different tool

It is tempting to store SHA-256(password) in a database. Do not. SHA-2 is designed to be fast, and a single modern GPU can compute billions of SHA-256 hashes per second, which makes guessing common passwords trivial. Unsalted hashes also let attackers use precomputed lookup tables.

OWASP's Password Storage Cheat Sheet recommends Argon2id first, then scrypt, then bcrypt, all of which are deliberately slow and salted. Use your framework's built-in password hashing rather than rolling your own.

Common mistakes

Comparing hashes in different cases. Hex is case-insensitive; 2CF2 and 2cf2 are the same bytes. The compare box ignores case.

Hashing a string that looks the same but is not. Windows line endings (\r\n), a byte order mark, or smart quotes pasted from a word processor all change the hash.

Treating a hash as a secret. A hash of a guessable value, like an email address or phone number, is easy to reverse by guessing. For signing messages with a secret key, use HMAC, not a plain hash.

How we calculate: sources

Frequently asked questions

What is a hash?

A fixed-length fingerprint of data. The same input always gives the same hash, and changing even one character changes it completely: the SHA-256 of "hello" starts 2cf24dba, while "Hello" starts 185f8db3. You cannot turn a hash back into the input.

How do I verify a file checksum?

Choose the file, then paste the checksum from the download page into the compare box. If it matches, a ✓ appears next to the algorithm. On the command line: shasum -a 256 file on macOS, sha256sum file on Linux, or Get-FileHash file on Windows PowerShell.

Which hash algorithm should I use?

SHA-256 for almost everything: checksums, content addressing, signatures, and API request signing. SHA-512 is equally secure and can be faster on 64-bit CPUs. Avoid SHA-1 and MD5 for anything security-related; practical collisions exist for both.

Is MD5 still safe to use?

Only for spotting accidental corruption, like matching an old download page's MD5 checksum. Attackers can craft two different files with the same MD5 in seconds, so never rely on it where someone could tamper with the file. CRC32 is weaker still: it is an error check for zip files and network frames, not a security hash.

Is hashing the same as encryption?

No. Encryption is reversible with a key; hashing is one-way. Use encryption to protect data you need to read later, and hashing to verify data or store passwords.

Can I use SHA-256 to store passwords?

Not on its own. Plain SHA-256 is fast, which lets attackers try billions of guesses per second. Use a slow, salted password hash such as Argon2id, scrypt, or bcrypt, as OWASP recommends.

Why does my hash differ from another tool's?

Usually invisible input differences: a trailing newline (echo adds one; use echo -n), Windows line endings, or a different text encoding. This tool hashes the exact UTF-8 bytes you type.

Is my input kept private?

Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.