Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes instantly. Real-time computation, fully client-side.
Hash will appear here…
Hash will appear here…
All hashing runs locally in your browser using the Web Crypto API — your data never leaves your device.
A cryptographic hash function turns input of any length into a fixed-length digest, and changing a single character produces a completely different result. This tool computes MD5, SHA-1, SHA-256 and SHA-512 digests of the text you enter and shows them as hexadecimal strings that update as you type.
Text is hashed as UTF-8 bytes, which is what sha256sum, openssl dgst, Node's crypto module and most server-side libraries produce for the same bytes. The SHA digests come from the browser's Web Crypto API (crypto.subtle.digest). MD5 is not part of Web Crypto, so it is computed with a small JavaScript implementation.
Typical uses are checking a published checksum, building a cache key or ETag, and confirming that two values are byte-for-byte identical. When two strings hash differently and you need to see where they differ, Text Compare shows the actual changes.
A plain hash is not a way to store passwords: fast algorithms like these can be brute-forced at billions of guesses per second on a single GPU. Use a slow, salted scheme such as Argon2, bcrypt or scrypt. If what you need is a random secret rather than a digest, use the password generator.
- Select the algorithms you want. MD5 and SHA-256 are on by default; click SHA-1 or SHA-512 to add them.
- Type or paste text into the input box. Every selected digest updates as you type.
- Switch on UPPERCASE if the value you are comparing against uses capital hex digits.
- Click the copy button on a result row to copy that digest.
- MD5, SHA-1, SHA-256 and SHA-512 side by side, each toggled on or off
- Real-time hashing of text input, encoded as UTF-8
- SHA family computed with the Web Crypto API; MD5 in plain JavaScript
- Lowercase or uppercase hex output
- Digest size in bits shown for each algorithm
- Hashing runs in the browser; input is not uploaded
Digests of the same input
Input: hello MD5: 5d41402abc4b2a76b9719d911017c592 SHA-1: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d SHA-256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Each algorithm produces a fixed-length result regardless of input length.
A trailing newline changes everything
Input: hello + newline MD5: b1946ac92492d2347c6235b4d2611184 $ echo "hello" | md5sum b1946ac92492d2347c6235b4d2611184 -
Pressing Enter after the text adds a newline byte, which is also what echo appends on the command line.
Matching the command line
$ printf '%s' 'hello' | sha256sum 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 -
printf without \n hashes exactly the bytes you typed, so the result matches the tool.
Digest sizes
MD5 128 bits 32 hex characters SHA-1 160 bits 40 hex characters SHA-256 256 bits 64 hex characters SHA-512 512 bits 128 hex characters
Each hex character encodes 4 bits, which is how the bit count next to each result is calculated.
The hash does not match the one from the command line
The bytes differ. echo adds a trailing newline, Windows files often end lines with CRLF, and in Windows PowerShell 5.1 the > redirect writes UTF-16 instead of UTF-8.
Use printf '%s' or echo -n, check line endings, and save files as UTF-8 before hashing them.
Two strings look identical but hash differently
Invisible differences such as a non-breaking space, a zero-width character, or é written as one code point in one string and e plus a combining accent in the other.
Paste both into Text Compare to find the difference, or normalise the text (for example to Unicode NFC) before hashing.
A correct hash fails a string comparison
One side is uppercase hex and the other lowercase. The value is the same, but a plain string comparison treats them as different.
Toggle UPPERCASE to match, or compare the hex strings case-insensitively in code.
No hash rows are shown
All algorithms are switched off.
Click at least one algorithm button above the input.
Are MD5 and SHA-1 still safe to use?
Not where an attacker could craft input. Practical collisions exist for both: MD5 since 2004 and SHA-1 since the SHAttered attack in 2017. They are still fine for non-adversarial checks such as spotting accidental file corruption. For signatures, certificates or anything security-related, use SHA-256 or SHA-512.
Can I store passwords as SHA-256 hashes?
You should not. SHA-256 is designed to be fast, which makes guessing attacks cheap, and an unsalted hash lets identical passwords share one digest. Use Argon2id, bcrypt or scrypt through your language's standard library.
Can I hash a file with this tool?
No, it hashes text only. For files, use sha256sum file on Linux, shasum -a 256 file on macOS or Get-FileHash file -Algorithm SHA256 in PowerShell.
Does it support HMAC or salted hashes?
No. It computes plain digests with no key or salt. HMAC, used for webhook and API request signatures, needs a secret key and a separate calculation, so the outputs here will not match an HMAC signature.
Can a hash be reversed?
Not mathematically. However, short or common inputs can be found by trying guesses or looking them up in precomputed tables, which is why hashes of simple strings such as hello or 123456 are easy to identify.
- Password GeneratorGenerate secure passwords with custom length, character options, and strength indicator.
- Base64 EncoderEncode and decode Base64 strings instantly — supports text and URL-safe mode.
- UUID GeneratorGenerate random unique UUIDs (v4) in multiple formats — perfect for IDs and tokens.
- JWT DecoderDecode and inspect JWT tokens — header, payload, signature at a glance.
- JWT ParserDecode and inspect JWT tokens — view header, payload, and signature structure.
- Private NotesSend a self-destructing, end-to-end encrypted note. The link works once, then the note is deleted.