esc

Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-384, SHA-512 and HMAC hashes for text or files locally in your browser.

Plain text 0 B
Digests
Verify
MD5 128-bit
…
SHA-1 160-bit
…
SHA-256 256-bit
…
SHA-384 384-bit
…
SHA-512 512-bit
…
Hashed Text — in Hex
Guide

What a hash is — and what it isn't

A cryptographic hash maps any input — a word, a paragraph, or a file — to a fixed-length fingerprint. This hash generator computes MD5, SHA-1, SHA-256, SHA-384 and SHA-512 digests for text and files, with optional HMAC for keyed message authentication. The same input always yields the same digest, while the smallest change produces a completely different one. Hashes are one-way : you can't reverse a digest back into the original data, which makes them ideal for verifying integrity, deduplicating content, and indexing.

Hashing is not encryption and not a password store on its own. MD5 and SHA-1 are broken for security use — collisions are practical — so treat them as checksums only, never for signatures or passwords. Prefer SHA-256 or stronger for integrity checks that matter. For passwords, use a dedicated password hashing function such as Argon2, bcrypt or scrypt rather than a plain SHA hash. To authenticate a message with a shared secret, switch on HMAC and supply a key. Everything here runs locally; the text, files and keys you enter never leave your machine.

Examples

Hash generator examples

Hashes are easiest to understand with known inputs. Type these into the text box (without quotes) and compare the digests; they are the same values any correct implementation produces.

Input Algorithm Digest (hex)
hello MD5 5d41402abc4b2a76b9719d911017c592
hello SHA-1 aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
hello SHA-256 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Hello SHA-256 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969
(empty) SHA-256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
hello, HMAC key secret HMAC-SHA-256 88aab3ede8d3adf94d26ab90d3bafd4a2083070c3bcce9c014ee04a443847c0b

Changing one capital letter produces an unrelated SHA-256 digest, and even empty input has a fixed hash. Switch the output to Base64 and the SHA-256 of hello becomes LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ= — the same 32 bytes, just encoded differently. To reproduce a value on the command line without adding a newline:

printf '%s' 'hello' | sha256sum
printf '%s' 'hello' | openssl dgst -sha256 -hmac 'secret'
Reading results

How to read the digests

Every algorithm row is computed at once from the same input bytes. Digest length tells you which algorithm produced a hash you found elsewhere:

Algorithm Size Hex characters Base64 characters Status
MD5 128-bit 32 24 Collisions practical — checksums only
SHA-1 160-bit 40 28 Collisions practical — legacy use only
SHA-256 256-bit 64 44 Current, widely used
SHA-384 384-bit 96 64 Current
SHA-512 512-bit 128 88 Current
  • Hex is lowercase by default; Uppercase only changes letter case, not the value, and is disabled in Base64 mode.
  • With HMAC on, the row labels change to HMAC-SHA-256 and so on, and every digest depends on the secret key as well as the input.
  • Verify compares a pasted value against every row. Hex is matched case-insensitively and spaces or colons are ignored, so a fingerprint like AA:F4:C6:… works; Base64 must match exactly. A match highlights the row and names the algorithm.
  • The status bar shows the source (text or file), the number of input bytes and the output encoding — a quick way to spot an unexpected extra byte.
Use cases

Common uses for a hash generator

  • Verifying a download. Switch to File, drop the file in and paste the publisher's SHA-256 checksum into Verify . A match means the file is byte-for-byte what the checksum describes; it only proves authenticity if the checksum itself came from a trusted source.
  • Debugging webhook signatures. Many providers sign the raw request body with HMAC-SHA-256. GitHub, for example, sends X-Hub-Signature-256: sha256=<hex digest> . Paste the exact body, enable HMAC with your secret, and compare the hex part.
  • Comparing two values. Hash two configuration files or text blocks and compare short digests instead of the full content; use the Base64 tool if one side is Base64-encoded.
  • Generating cache keys and identifiers where you need a stable fingerprint of some content, not secrecy.
Troubleshooting

Why a hash does not match

A trailing newline

echo hello | sha256sum hashes hello plus a newline, giving 5891b5b5…6be03 instead of 2cf24dba…b9824. Use printf '%s' or echo -n, or check the byte count in the status bar.

Line endings and character encoding

Text is encoded as UTF-8 before hashing, so accented letters, emoji and non-Latin scripts must also be UTF-8 on the other side. Browsers normalize line breaks typed or pasted into a text box to LF, so text copied from a file with Windows CRLF line endings will not match the file's hash. Use File mode when you need the exact bytes.

Verify says "no match" for the right value

Strip prefixes such as sha256= or SHA256 (file) = and paste only the digest. Base64url values (with - and _, often without = padding) are not recognized; convert them to standard Base64 or compare the hex form instead.

HMAC differs from the server's signature

The key is used as UTF-8 text exactly as typed. If your secret is meant to be decoded from hex or Base64 first, this tool cannot do that step. Also make sure you hash the raw body: re-formatting JSON changes the bytes and therefore the signature. If the key field is empty, the SHA rows can show a dash because Web Crypto refuses a zero-length HMAC key.

Limitations

Security notes and limitations

  • A hash is not encryption. There is no key to reverse it, and short or common inputs can be found by guessing — which is why lookup sites can "crack" the MD5 of a dictionary word.
  • MD5 and SHA-1 are broken for collision resistance. Attackers can create two different inputs with the same digest, so do not use them for signatures, certificates or any integrity check an attacker could influence.
  • Fast hashes are not password storage. SHA-256 and SHA-512 are designed to be fast, which helps attackers test billions of guesses. Store passwords with a dedicated password hashing function such as Argon2id, bcrypt or scrypt, with a unique salt per password. This tool does not compute those.
  • Supported algorithms only. The tool offers MD5, SHA-1, SHA-256, SHA-384 and SHA-512, plus HMAC with each. It does not compute SHA-3, BLAKE2/BLAKE3, CRC32 or SHA-224.
  • Files are read into memory. Hashing happens in the browser, so very large files may be slow or fail depending on your device's memory.

To check the TLS certificate of a live site, use the SSL Checker. To inspect a signed token rather than a raw digest, use the JWT Decoder.

FAQ

Frequently asked questions

Is my data uploaded anywhere?

No. SHA-1, SHA-256, SHA-384 and SHA-512 are computed with the browser Web Crypto engine, and MD5 runs in a bundled routine. Text, files and HMAC keys stay in your browser.

Can I reverse a hash back to the original text?

No. Hashing is one-way. So-called hash decrypters are lookup tables of precomputed common inputs, not true reversal. Use encoding or encryption if you need reversible conversion.

Should I still use MD5 or SHA-1?

Use MD5 or SHA-1 only for legacy checksums or non-security comparisons. Both are broken for collision resistance. Use SHA-256 or stronger for integrity checks where attackers matter.

Is SHA-256 enough for password storage?

No. A plain hash is not enough for password storage. Use a password hashing function such as Argon2, bcrypt or scrypt with salts and an appropriate work factor.

What does HMAC add?

HMAC mixes a secret key into the hash so only someone with the same key can reproduce the digest. It is useful for webhook signatures and message authentication.