Sign a message with a secret key: HMAC-SHA-256, SHA-1, SHA-512 and MD5.
Hash Generator
MD5, SHA-1, SHA-256, SHA-512 and CRC-32 of any text, with checksum verification.
Runs in your browserProcessed locally. Your input never leaves your device.
Optional. Paste the checksum a download page published and this will say whether it matches. A whole line from md5sum or shasum works too.
Details
About this tool
Produces the MD5, SHA-1, SHA-256, SHA-384, SHA-512 or CRC-32 digest of whatever you paste, in hex or Base64, or all six at once so they can be compared. Paste a published checksum beside it and the tool answers the question you actually have - does it match? - instead of leaving you to compare sixty-four characters by eye.
A hash function turns input of any length into a fixed-length fingerprint: 128 bits for MD5, 256 for SHA-256. The same input always produces the same fingerprint, and changing a single character flips roughly half the output bits, which is what makes a digest useful for noticing that something changed. The transformation runs one way only. Nothing in the digest can be turned back into the text that produced it.
The everyday use is integrity. A mirror publishes the SHA-256 of an installer, you hash the file that actually arrived, and the two either agree or the download is corrupt. Git names every commit by a hash, package managers pin dependencies by one, and databases use them to spot duplicate rows without comparing the rows.
What a hash is not is encryption, and it is not a way to store a password. Encryption is reversible with a key; a hash throws its input away. And although nothing reverses a digest, an attacker does not need to reverse it - they guess, hashing billions of candidates a second until one matches, which finds any short or common password almost immediately. Passwords belong in a deliberately slow, salted function such as bcrypt, scrypt or Argon2. A card number belongs nowhere near a plain hash at all, because there are few enough valid numbers to simply try them all and see which one produces the digest you have.
For anything security-related, choose SHA-256. MD5 and SHA-1 are offered because published checksums and older systems still use them, not because they are sound: both have practical collision attacks, meaning two different files can be built deliberately to share one digest. For catching a download that arrived damaged they remain perfectly adequate, and that is what most published MD5 sums are for.
Keep going
Related tools
- Runs in your browserDeveloper
-
Convert text to Base64 and back.
Runs in your browserDeveloper -
Generate strong, cryptographically random passwords on your device.
Runs in your browserDeveloper
Good to know
Questions people actually ask
- Why does my hash differ from the one md5sum printed?
- Almost always a trailing newline. A text file usually ends with one, and it is part of the file, so it is part of the digest - but pasting the contents into a box rarely brings it along. Add a final newline, or hash the file itself with the command-line tool.
- What is an MD5 hash?
- A 128-bit fingerprint of your input, written as 32 hexadecimal characters. Any input length produces the same 32 characters, the same input always produces the same result, and the operation cannot be run backwards. It was designed in 1991 as a cryptographic hash and is still everywhere - in package indexes, mirror listings and older APIs - mostly as a checksum for detecting accidental corruption.
- Is MD5 safe to use?
- Not for anything security-related. Since 2004 it has been possible to construct two different inputs that share an MD5 digest on purpose, and today it takes seconds on a laptop. That means an MD5 match cannot prove a file was not tampered with - only that it was not damaged in transit. It must never be used to store passwords, and hashing a card number with it protects nothing, because there are few enough valid card numbers to try every one of them. For catching a corrupted download it is still perfectly adequate.
- MD5 or SHA-256 - which should I use?
- SHA-256, unless something else has already decided for you. It is the current default for signatures, certificates and integrity checks, no collision has ever been produced against it, and it costs no more to compute at the sizes anyone pastes into a web page. Use MD5 or SHA-1 only when you are matching a checksum somebody else published in that algorithm, or talking to a system that accepts nothing newer.
- What is a hash collision?
- Two different inputs that produce the same digest. Collisions must exist for any hash - there are infinitely many possible inputs and a fixed number of outputs - so what matters is whether anyone can find a pair on purpose. For MD5 and SHA-1 they can, which is why neither can any longer prove that a file is the one you were promised. For SHA-256 nobody has, and on current understanding nobody will.
- Can I get the original text back from a hash?
- No, and nor can anyone else. A hash discards its input: a gigabyte and a single letter both come out as the same 64 characters, so most of what went in is simply not there any more. What is possible is guessing. If the input was short or common, an attacker hashes billions of candidates until one matches, and "decrypt MD5" sites are just large tables of guesses somebody already made. That is exactly why passwords are stored with a slow, salted function such as bcrypt or Argon2 rather than with a plain hash.
- Why is a SHA-256 always 64 characters?
- Because the digest is 256 bits and hexadecimal writes four bits per character. The same arithmetic gives MD5 32 characters, SHA-1 40, SHA-384 96 and SHA-512 128 - which is a useful trick when a checksum is published without saying which algorithm produced it. Choose Base64 instead and the same bytes come out shorter, since Base64 packs six bits per character rather than four.
- Is my text sent to a server?
- No. SHA digests come from the browser's built-in Web Crypto, and MD5 and CRC-32 run in JavaScript on the page. Nothing leaves your device.
- Can it hash a file rather than text?
- Not yet - this tool takes text. For a large download, your operating system already has the tool: shasum -a 256 file on macOS and Linux, or Get-FileHash file on Windows.