Hash Generator
Type or paste text and generate a SHA-256, SHA-1 or MD5 fingerprint. The same input always gives the same hash, and a single changed character changes everything.
A hash function turns any amount of input into a short, fixed-length fingerprint. Feed in a word or a whole novel and you get the same number of characters back. Two properties make this useful: the same input always produces the same output, and changing even one character produces a completely different output. A hash cannot be run backwards to recover the original, which is why it is called a one-way function. This page computes three of the best-known ones for any text you enter.
How to use the hash generator
- Enter your text in the Input Text box. Be careful with trailing spaces and line breaks, because they count as part of the input.
- Press Generate SHA-256, Generate SHA-1 or Generate MD5.
- The hash appears as a string of lowercase hexadecimal characters, labelled with the algorithm name. Use Copy to take it.
- Press another button to see the same input hashed a different way. Your input stays in the box.
Text is converted to UTF-8 bytes before hashing, which is the convention almost every command-line tool and programming language uses, so results match what you would get from sha256sum, openssl dgst or a library in your own code, provided you feed them identical bytes.
The three algorithms compared
| Algorithm | Output length | Status | Suitable for |
|---|---|---|---|
| SHA-256 | 256 bits, 64 hex characters | Current, widely trusted | Integrity checks, signatures, general fingerprints |
| SHA-1 | 160 bits, 40 hex characters | Collisions demonstrated in practice | Legacy compatibility only |
| MD5 | 128 bits, 32 hex characters | Broken for security purposes | Non-adversarial checksums, cache keys |
Here are real values for the three-letter input abc, which you can reproduce on this page to confirm the tool is working:
- MD5:
900150983cd24fb0d6963f7d28e17f72 - SHA-1:
a9993e364706816aba3e25717850c26c9cd0d89d - SHA-256:
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
Now change the capital: hashing Abc gives a SHA-256 beginning 06d90109c8cc, which shares nothing recognizable with the first. This "avalanche effect" is the reason hashes work as tamper-evident fingerprints.
What hashes are good for
- Verifying downloads. Publishers often list a SHA-256 next to a file. Hash the file on your machine and compare. This tool hashes text you paste, so it is ideal for strings and snippets; for large binary files use your operating system's checksum command.
- Detecting changes. Store the hash of a configuration block or message. If the hash later differs, the content changed.
- Cache keys and deduplication. Developers hash content to produce a short identifier, so identical content maps to the same key.
- Checking API signatures. Some webhook schemes require you to hash a payload together with a secret; reproducing the plain hash step here helps you debug a mismatch.
- Learning. Watching how a one-letter edit rewrites the whole digest is the quickest way to understand the avalanche effect.
Do not use plain hashes to store passwords
Important: MD5, SHA-1 and even a single round of SHA-256 are far too fast for password storage. Attackers can test billions of guesses per second against them, and common passwords appear in precomputed tables. Real systems use slow, salted password-hashing schemes such as bcrypt, scrypt or Argon2. This tool is for fingerprints and checksums, not for creating password records.
Similarly, MD5 and SHA-1 should not be used where an attacker could craft two different inputs with the same hash, for example in digital signatures or certificates. They remain perfectly adequate for spotting accidental corruption, as long as nobody is trying to fool you.
Why your hash might not match another tool
- Hidden whitespace. A trailing newline changes the hash completely. Command-line
echoadds one by default, whereas the text box does not unless you press Enter. - Different encodings. Windows tools sometimes use UTF-16 or a legacy code page. This tool uses UTF-8.
- Uppercase versus lowercase output. The digits are the same, and hex comparison should ignore case. This tool prints lowercase.
- Hashing a file versus its text. The text you paste is not the same as the file's bytes if the file has a byte-order mark or different line endings.
How it is computed
SHA-256 and SHA-1 use your browser's built-in cryptography interface, the same implementation used for secure connections. MD5 is not offered by that interface because it is considered obsolete, so the page includes a small MD5 routine written in JavaScript. All three run locally; the text you enter is not sent to a server by this tool.
Frequently asked questions
Can a hash be reversed to get my text back?
Not by calculation. However, short or common inputs can be guessed by hashing many candidates, which is why plain hashes are unsafe for passwords.
Is SHA-256 encryption?
No. Encryption is reversible with a key. A hash has no key and no way back.
Why are all the outputs the same length regardless of my input?
That is how hash functions are defined: a fixed size output for any size of input, 64 hex characters for SHA-256.
Which one should I choose?
Use SHA-256 unless a system explicitly requires SHA-1 or MD5 for compatibility.
Can two different inputs have the same hash?
In theory yes, since there are more possible inputs than outputs. For SHA-256 no collision has been found; for MD5 and SHA-1 researchers have produced deliberate collisions.