Hash Generator
Create MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text. The digests update as you type and never leave your browser.
The text is encoded as UTF-8 before hashing. Changing a single character produces a completely different digest.
Digest output
| Algorithm | Hash |
|---|---|
| MD5 | — |
| SHA-1 | — |
| SHA-256 | — |
| SHA-384 | — |
| SHA-512 | — |
Every row is calculated from the same input, so you can compare lengths and values side by side.
Digest size reference
| Algorithm | Digest bits | Hex characters |
|---|---|---|
| MD5 | 128 | 32 |
| SHA-1 | 160 | 40 |
| SHA-256 | 256 | 64 |
| SHA-384 | 384 | 96 |
| SHA-512 | 512 | 128 |
Hex output uses four bits per character, so the character count is always the bit length divided by four.
A hash is a fingerprint, not a sealed envelope
Hash functions turn input of any length into a short, fixed-size value. The same input always produces the same digest, and the digest cannot be turned back into the original text.
What a hash function guarantees
A cryptographic hash function takes an arbitrary amount of data and returns a value of fixed length. MD5 always returns 128 bits, SHA-256 always returns 256 bits, and a one-character input is treated the same way as a ten-megabyte file. Four properties matter in practice:
- Deterministic: the same bytes always produce the same digest, on any machine and in any language.
- Fixed length: the output size depends on the algorithm, never on the input size.
- One-way: there is no inverse function. Recovering the input means guessing it and hashing the guess.
- Avalanche effect: flipping one bit of input changes roughly half the output bits, so similar inputs look unrelated.
hex characters = digest bits ÷ 4
SHA-256 produces 256 bits, and 256 ÷ 4 = 64 hexadecimal characters. That is why every SHA-256 digest you see has exactly 64 characters, regardless of whether it describes a word or a disk image.
Reproducible checks you can run
Because hashing is deterministic, published test vectors are a reliable way to check a tool. The string abc is the classic example, and the SHA-256 and MD5 values below are the standard digests for it:
| Input | Algorithm | Digest |
|---|---|---|
abc | SHA-256 | ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad |
abc | MD5 | 900150983cd24fb0d6963f7d28e17f72 |
abc followed by a newline | SHA-256 | A different 64-character value |
Paste abc into the field above and compare the SHA-256 and MD5 rows. Then press Enter at the end of the text and watch the digest change: the newline is part of the input, so it is part of the hash. That single experiment explains most "the hashes do not match" support tickets.
MD5 and SHA-1 in 2026
Both algorithms still work as fast, deterministic checksums, and both are unsuitable for security decisions. MD5 has had publicly demonstrated collision attacks since 2004: two different files can be crafted to produce the same 128-bit digest. SHA-1 followed, with a practical collision demonstrated in 2017. A collision lets an attacker substitute one document for another without changing the fingerprint.
Use MD5 and SHA-1 to reproduce legacy values, to compare a checksum with an old manifest, or to investigate a system that already uses them. Use SHA-256 or stronger when the digest is part of a trust decision: package verification, certificate fingerprints, signed documents or API request signing. For password storage, use none of them directly — see the salting section below.
Where hashes are used
| Use case | Typical algorithm | What the hash proves |
|---|---|---|
| File integrity | SHA-256 | The download matches the published checksum |
| Digital signatures | SHA-256 or SHA-384 | The signed bytes were not altered |
| Git object IDs | SHA-1 (historical) | The content addressing of a commit or blob |
| API request signing | HMAC-SHA256 | The request was made with the shared secret |
| Cache keys | MD5 or SHA-1 | A short, stable key for a larger payload |
| Password storage | bcrypt, scrypt, Argon2 | Verification without storing the password |
Cache keys are the one place where a weak hash is usually acceptable: the goal is a short identifier, not resistance to a determined attacker. The moment the digest controls access, payment or identity, the strength of the algorithm matters.
Hashing text is not hashing a file
A file hash depends on the exact bytes: character encoding, byte-order mark, line endings and trailing whitespace all count. A text editor may save the same paragraph as UTF-8 or UTF-16, with LF or CRLF, and each version hashes differently. This page converts your input to UTF-8 in the browser, which matches the most common convention on the web.
If a text hash does not match the value produced by another tool, compare the byte sequences rather than the visible characters. On Windows, a file copied through a text-mode pipeline can gain a carriage return on every line; hashing the file directly avoids the conversion.
Salts, peppers and slow hashes
A plain SHA-256 digest of a password is fast to compute, and speed helps an attacker. Given a stolen table of unsalted digests, an attacker can hash a dictionary of candidate passwords and compare the results at billions of guesses per second on modern hardware. A salt — a unique random value stored next to each digest — forces the attacker to repeat the work for every account instead of building one shared lookup table.
A salt does not make a fast hash slow, so password storage uses algorithms designed to be expensive: bcrypt, scrypt or Argon2, with a cost parameter tuned so one verification takes a noticeable fraction of a second. A pepper is an extra secret value kept outside the database. None of this changes the rule for this page: the generator is a debugging and checksum tool, not a password hashing service.
Common hashing mistakes
- Comparing different lengths. A 32-character value and a 64-character value cannot be the same digest, even if they look similar at a glance.
- Ignoring case. Hex output is case-insensitive by convention, but a byte comparison of strings is not. Normalize to lowercase before comparing.
- Hashing the wrong representation. JSON serialized with different key order, indentation or number formatting hashes differently.
- Using MD5 for signatures. A digest that is easy to collide cannot prove that a document is unique.
- Truncating the digest. Shortening a digest to save space reduces its collision resistance far more than the character count suggests.
- Hashing secrets into a URL. A digest in a query string is logged by proxies and browsers, which defeats the point of a secret.
When a comparison fails, print the byte length and the encoding of both sides before changing the algorithm. The mismatch is usually in the input, not in the hash.
Related Developer & Security Tools
| Tool | What does it do? | Action |
|---|---|---|
| Base64 Encoder & Decoder | Encode text to Base64 or decode a Base64 string back to plain text. | Base64 Codec → |
| Hash Generator | Create MD5, SHA-1, SHA-256 and SHA-512 hashes from text. | Current Page |
| UUID Generator | Generate random UUID v4 values, one or many at a time. | UUID Maker → |
| Password Generator | Build strong random passwords with length and character options. | Password Maker → |
| Regex Tester | Test a regular expression against sample text and inspect the matches. | Regex Test → |
| JWT Decoder | Decode a JWT header and payload locally, without sending the token anywhere. | JWT Decode → |
Rate this Tool
Based on 0 user ratings.