Hash Generator
Create MD5, SHA-1, SHA-256 and SHA-512 hashes (and HMAC) for text or files, and verify downloads against a checksum.
Input
Compare hash
Paste the hash published on the download page to check whether it matches any result above.
Create MD5, SHA-1, SHA-256 and SHA-512 hashes (and HMAC) for text or files, and verify downloads against a checksum.
Paste the hash published on the download page to check whether it matches any result above.
Creates hash values such as MD5, SHA-1 and SHA-256 from text. Use it to check file integrity or for development tests.
Enter some text.
Choose the hash type.
Copy the result.
Upload the file in the 'File' tab and hashes from MD5 to SHA-512 are calculated. Paste the hash value given by the distributor into 'Compare hash' and it tells you which method matches. It compares ignoring case and spaces.
HMAC is a hash made by mixing in a secret key, used in development tests such as API signature checking. Turn on the HMAC option and enter a key, and the SHA-family results become HMACs. MD5 does not support HMAC, so no value is shown.
Even a single invisible space or line break makes the hash completely different. This tool converts the text you enter to UTF-8 bytes before calculating, so also check that the character encoding is the same. The output can be lowercase hex, uppercase hex or Base64, so check that the notation matches too.
A hash is a function that reduces data of any length to a value of fixed length. The same input always gives the same value, and changing even one character gives a completely different value. For example, the SHA-256 of 'hello' is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824, while 'Hello' with a capital H gives 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969, which is entirely different.
You cannot recover the original text from a hash. That is why it is often used to check whether a downloaded file is correct (integrity). If the hash written by the publisher matches the hash you compute, the file was not changed on the way.
MD5 (32 digits) and SHA-1 (40 digits) are known to allow collisions, where different inputs give the same value, so they are not used where security matters. They are still widely used as simple checksums to see whether a file was corrupted in transit. The MD5 of 'hello' is 5d41402abc4b2a76b9719d911017c592 and its SHA-1 is aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d.
For newly built services it is common to use SHA-256 or higher. Text and files are computed inside your browser and not sent to a server.
A general hash such as SHA-256 is very fast, so it is not suitable for storing passwords. Being fast means an attacker can try countless guesses. For passwords, it is recommended to store them using a deliberately slow method such as bcrypt, scrypt or Argon2, with a salt added.
Each hash function has a fixed output length, so no matter how long the input is, the output comes out at the same length.
MD5
SHA-1
SHA-256
SHA-512
Even a one-character difference in the input gives a completely different hash, so first suspect an invisible difference.
The hashes of an empty string and of abc are widely known, so you can use them to check that the tool works correctly.
Empty string
abc
The SHA-256 hash of abc starts with ba7816bf, and that of an empty string starts with e3b0c442.
Calculate the hash of the file you received and compare it with the hash the provider published.
The file is calculated only on this device and is not sent anywhere. Large files can take time.
Don't use them where security is needed; they are fine only for uses unrelated to security, such as simple file checks or duplicate detection.
A method for producing collisions in MD5 was published in 2004, and a real SHA-1 collision was made public in 2017.
A collision is when two different inputs give the same hash, so using them for signatures or certificates creates a risk of forgery.
A hash cannot be reversed, encryption can be reversed with a key, and encoding can be reversed by anyone.
Hash
Encryption
Encoding
HMAC is a hash made by mixing in a secret key, used to confirm that a message came from someone who knows the key.
It is widely used to verify signatures on webhooks and API requests, and in this tool too you can enter a secret key to calculate an HMAC.
Unlike a plain hash, the key point is that nobody can produce the same value without the key.
A salt is a random value mixed in before hashing, which prevents the use of precomputed hash tables.
A rainbow table is a table with the hashes of common passwords calculated in advance. Storing passwords with only a plain SHA-256 and no salt is vulnerable to such tables.
So use a salt and a slow dedicated method for storing passwords, and use this tool's fast hashes for learning and file checks.
For storing passwords, do not use a general hash like SHA-256 as it is; use a dedicated method such as bcrypt, scrypt or Argon2.
Besides file checking, they are used widely in places you rarely notice.
Operating systems have built-in commands, so you can calculate it without extra programs.
Windows
Mac
Linux
A good hash function always gives the same result for the same input, and it must be hard to work out the input from the result.
If you enter abc and abd in turn in this tool, you can see the hashes look completely different.
Despite a one-character difference, almost every position of the SHA-256 result changes, so you cannot tell from the hashes how similar the inputs are.
That is why hashes are good for checking whether even a single bit of a file has changed.
No. SHA-256 and SHA-512 belong to the SHA-2 family, and SHA-3 is a separate standard with a completely different internal structure.
SHA-2 is still widely used and considered secure, and SHA-3 was created as an alternative in case a problem arises with SHA-2.
This tool calculates MD5, SHA-1, SHA-256 and SHA-512.
It is the same bytes written with different characters, and only the length changes.
MD5
SHA-1
SHA-256
SHA-512
When comparing with the hash on a download page, match the notation first. You can change the output format in this tool.
Paste the hash given by the distributor into the comparison box, and it tells you whether any of the calculated results match.
It prevents mistakes you might make by missing differences of case and spaces when comparing by eye.
If a match is shown, the file is the same as the original; if not, the download was cut off or the file was changed, so download it again.
A hash obtained from the same place as the file can change together with it, so where possible compare with an official notice from a different channel.
A matching hash only means the file is the same; it does not mean the file is safe.
If even one byte of the file differs, the hash differs, so you have to look for invisible differences.
Images and documents can have their metadata changed just by opening and saving in a photo app, and the hash changes.
The sender and the receiver share the same secret key, and the sender attaches the HMAC of the request body in a header so the receiver can check for forgery.
The receiver calculates the same kind of HMAC from the body it received, and if it equals the header value, treats it as a valid request.
If you enter a body and key in this tool's HMAC option and calculate, you can compare whether your own code's result is correct.
When comparing, use a constant-time comparison function so the value does not leak through response time.
MD5 and SHA-1 have a simple structure and are fast, and SHA-512 can be faster than SHA-256 in environments that use 64-bit operations.
But being fast also favors mass brute-force attacks, so passwords should be stored with methods deliberately designed to be slow.
For general integrity checks, SHA-256 is a reasonable choice in terms of security and compatibility.
I do not recommend putting this tool's MD5 or SHA-256 result into a database for storing passwords.
Fast hashes are easy to compute, so if leaked, passwords are easily cracked by mass guessing.
In a real service, use bcrypt, scrypt or Argon2 from a proven library, and set the salt and the cost value.
This tool is suited to file integrity checks, learning and comparing values during development.
Using the hash in the name so that the same content gets the same name is a common approach.
Large files take time to read and calculate, and the difference depends greatly on the device.
This tool calculates the file only on this device, so internet speed does not matter, but a very large file can use a lot of browser memory.
For very large files, calculating with an operating system command is more stable.