Hash Generator
A hash is a fixed-length fingerprint of some text. The same input always gives the same hash, and even a one-letter change produces a completely different result. This free hash generator calculates SHA-1, SHA-256, SHA-384 and SHA-512 at the same time using your browser’s built-in cryptography, so your text never leaves your device.
How to use it
- Type or paste your text into the Text to hash box.
- Press Generate hashes.
- Read the four results shown below the button, each labelled with its algorithm.
- Copy the one you need. SHA-256 is the most commonly requested.
- Change one character and press the button again to see how much the hash changes.
Worked example
| Input | Algorithm | Start of the hash |
|---|---|---|
| hello | SHA-256 | 2cf24dba5fb0a30e…9824 |
| abc | SHA-1 | a9993e364706816a…d89d |
| (empty text) | SHA-256 | e3b0c44298fc1c14…b855 |
These are the published reference values for each input, and the tool matches all three. SHA-256 always gives 64 characters, SHA-1 gives 40, SHA-384 gives 96 and SHA-512 gives 128, however long your text is.
What each algorithm is used for
- SHA-256 is the everyday choice for checksums, file integrity records and many developer tasks.
- SHA-384 and SHA-512 produce longer fingerprints for situations that call for extra margin.
- SHA-1 is included because older systems and checksums still list it, but it is no longer considered safe for security purposes.
Hashing is not encryption
A hash cannot be turned back into the original text, so it is not a way to hide something you want to read later. If you need that, use an encryption tool. Hashes are for checking that two pieces of text are identical, for example to confirm a download or detect a change.
A word on passwords
Do not use a plain SHA hash as your only password protection in an application. Real systems add a unique salt and use deliberately slow methods designed for passwords. This tool is meant for checksums, testing and learning.
Real situations where a hash helps
Software publishers often list the SHA-256 value next to a download. After downloading, you can compare the published value with the hash of your file to confirm it was not damaged or altered. This page hashes text rather than files, so it suits short strings such as tokens, configuration values and test data, where you want a reproducible fingerprint.
Developers also use hashes to build cache keys, to detect whether a piece of content has changed, and to create short identifiers from long strings. In each case the useful property is the same: identical input gives an identical hash, while any change gives an unrelated one.
Why one character changes everything
Try hashing “hello” and then “Hello”. The two SHA-256 results share nothing recognisable, even though the inputs differ by one capital letter. This avalanche effect is deliberate. It means you cannot guess how close an input is to another by comparing hashes, and it makes accidental matches extremely unlikely.
The length of the output never changes. A single letter and a whole book both produce 64 characters with SHA-256, which is why hashes are handy for comparing large amounts of data using a small, fixed-size value.
Checking your result is correct
A good habit is to test any hash tool against known values before trusting it. Hash the word hello with SHA-256 and the output should begin 2cf24dba and end 9824. Hash abc with SHA-1 and it should begin a9993e36. Hash empty text with SHA-256 and it should begin e3b0c442. All three match on this page, which confirms the calculation and the way text is converted to bytes.
If you compare with a result from another program and the values differ, the usual cause is hidden whitespace. A trailing newline, a space at the end, or a different text encoding changes the hash completely, so make sure both sides hash exactly the same characters.
Common mistakes to avoid
- Believing a hash can be decoded back into the text.
- Trusting SHA-1 for security decisions.
- Hashing text with a hidden trailing space or line break, which gives a different result.
- Comparing hashes in different letter case. The tool outputs lowercase hexadecimal.
- Using it to store passwords in a real application.
Frequently asked questions
Is my text uploaded?
No. The calculation uses the Web Crypto feature built into your browser.
Why is MD5 not included?
The browser’s cryptography does not provide it, and it is considered broken for security uses.
Why does an empty text have a hash?
Every input, including nothing, has a defined hash. For SHA-256 it starts with e3b0c442.
Does it handle non-English text?
Yes. Text is converted to UTF-8 bytes first, so accented letters and emoji work.
Can two texts share a hash?
In theory yes, but finding such a pair is practically impossible for SHA-256 and longer.
Related tools and guides
This tool is for checksums, testing and learning, and is not a substitute for professional security advice.
💡 Use this tool offline — save Coswaa as a web app on your phone. Works without internet, zero storage, completely free.
📲 Add to Home Screen →