Skip to main content
toolsxulo

Hash Generator – MD5, SHA-256 & SHA-512

Hash text or a file with MD5, SHA-1, SHA-256, SHA-384, or SHA-512. Compare the result with an expected hash. SHA-256 is the default.

Algorithm

How it works

The tool takes text or a file and computes a fixed-length hash of it with the algorithm you selected. For text, the input is encoded as UTF-8 before hashing, so "hello" and "Hello" produce different results. For a file, the file's raw bytes are hashed. If the file's contents are the same bytes as a text input, the hash is the same.

The algorithms are MD5, SHA-1, SHA-256, SHA-384, and SHA-512. The default is SHA-256. SHA hashes are computed with Web Crypto in the browser; MD5 is computed on the page from a local RFC 1321 implementation. For MD5 and SHA-1, a warning is shown: they are not suitable for passwords or signatures, only for a checksum. The "Uppercase output" checkbox changes what is displayed and copied, not the underlying digest. The compare field matches without regard to letter case. While the text field is empty, no hash is shown. Switching between text and file clears the output.

How to use it

  1. Choose text or file, then type in the field or pick a file from your computer.
  2. Choose an algorithm. If it is MD5 or SHA-1, a warning appears under the selector. You can also turn on uppercase output.
  3. Copy the hash, or paste an expected value in the compare field. If it matches, you see "Matches"; otherwise "No match".

Examples

Text hello, algorithm SHA-256 (the default), uppercase off2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 With uppercase output turned on, the same result is shown as 2CF24DBA5FB0A30E26E83B2AC5B9E29E1B161E5C1FA7425E73043362938B9824. Pasting either form into the compare field shows "Matches", because the comparison ignores case.
The same text hello, with MD5 and then with SHA-1MD5: 5d41402abc4b2a76b9719d911017c592. SHA-1: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d The tool shows a warning for both of these algorithms. The same bytes in a file (the contents hello in UTF-8, with nothing added) produce the same values in file mode.
Text Hello, world!, algorithm SHA-256315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3 The input is encoded as UTF-8. Hebrew text, for example שלום, produces a different hash: b7ac0398ef74193ab738b21df0912329303df10d868c2bac37a84a59d12c0e2f.

Frequently asked

What is the difference between MD5, SHA-1, and SHA-256?
All three compute a hash of the input, at different lengths. MD5 and SHA-1 are not suitable for passwords or signatures; the tool shows a warning for them. SHA-256 is the default. SHA-384 and SHA-512 are also available.
Why do "hello" and "Hello" give different results?
Any change to the input, including a capital letter, changes the bytes that are hashed. Text is encoded as UTF-8 before the hash is computed.
What happens in file mode?
The selected file's bytes are hashed, not the file name. If the contents are the same bytes as text you typed, the hash is the same. Switching from text to file clears the previous result.
Why does the comparison still match in uppercase?
The compare field ignores the difference between uppercase and lowercase. The "Uppercase output" checkbox only changes what is shown and copied.
What do I get if I leave the text field empty?
No hash is shown. The tool only computes a value when there is input.
Which algorithm should I choose?
For an ordinary checksum, SHA-256 is usually enough, and it is the default. MD5 and SHA-1 show a warning, and they are not suitable for passwords or signatures.

Related tools