Hash Validator
Check whether text is a valid hash as you type it, right in your browser, without sending it anywhere.
Input
Output
No value
Guide
What is a hash?
A hash, also called a digest or a checksum, is a short fingerprint of a file or a piece of text, made by a hash function. The same data always gives the same hash, and changing a single byte gives a completely different one. That makes hashes handy for checking downloads, spotting changed files and signing documents. A hash is usually written in hexadecimal digits, 0 to 9 and a to f, and each algorithm always makes the same number of them: an SHA-256 hash has 64 digits, an MD5 hash 32.
You'd check one when you copy a checksum and want to make sure nothing got cut off, or when a form or a database column should hold a hash of a given kind.
Tool description
Pick the algorithm in the Algorithm menu, which starts on SHA-256, then type or paste a hash into the Hash field. The result shows as you type: "Hash is valid" or "Hash is not valid". Spaces and line breaks around a pasted hash are ignored.
What the Algorithm menu decides
A hash check can only look at the length and the characters. A hash passes when it has exactly as many hexadecimal digits as the picked algorithm makes, in small or capital letters. Several algorithms share a length:
- 8 digits: CRC-32 and CRC-32B
- 32 digits: MD5, MD4, RIPEMD-128 and Tiger-128
- 40 digits: SHA-1, RIPEMD-160 and Tiger-160
- 48 digits: Tiger-192
- 64 digits: SHA-256
- 96 digits: SHA-384
- 128 digits: SHA-512
A hash fails when it has a digit too few or too many, a letter after f, colons or spaces between the bytes (as certificate fingerprints often have), or a prefix such as 0x, and when it's written in Base64 instead of hexadecimal digits.
Good to know
- Since only the length counts, the check can't tell which algorithm made a hash: any 64 digits pass as SHA-256, including hashes made with SHA3-256 or BLAKE2s. Nor can it tell whether a hash belongs to your file: to verify a download, make the file's hash yourself and compare the two.
- Password hashes such as bcrypt have a format of their own, with
$signs, so they fail with every algorithm. - To make the hash of a text or a file, use the Hash Generator. To narrow down which algorithm made a hash, try the Hash Type Identifier.
Features
- Checks MD5, SHA-1, SHA-256, SHA-512 and other hashes
- The exact length for the algorithm you pick
- Accepts small and capital letters
- Runs in your browser, so nothing you type is sent anywhere