Free Hash Generator
Get the SHA-1, SHA-256, SHA-384 or SHA-512 digest of any text the moment you type it.
What is a Hash Generator?
A hash generator computes a fixed-length fingerprint, called a digest, from any text. The same text always gives the same digest, and changing even one character gives a completely different one, which is what makes hashes useful for comparing and checking data.
This tool computes SHA-1 and the SHA-2 functions SHA-256, SHA-384 and SHA-512, as defined in NIST’s FIPS 180-4, using your browser’s built-in Web Crypto engine. Your text is converted to UTF-8 bytes and hashed exactly as typed, including spaces and line breaks, and the digest is shown in lowercase hexadecimal.
Key Features
Four SHA Functions, One Click Apart
Switch between SHA-1, SHA-256, SHA-384 and SHA-512 and the digest recomputes at once. Compare algorithms on the same input without copying anything.
Byte-Exact Hashing
Every space, tab and line break is part of the input, just as in a file. That is how you find out why two strings that look identical hash differently.
Correct for Every Language
Text is encoded as UTF-8 before hashing, the encoding nearly every system uses. Café here hashes the same as Café in a UTF-8 file or a Python string.
The Browser’s Own Crypto Engine
Digests come from Web Crypto, the audited implementation built into your browser, not a hand-written JavaScript port. Results match OpenSSL and sha256sum byte for byte.
Nothing Leaves the Tab
Hashing runs locally, so an API key, email list or contract clause you paste isn’t sent to any server. Close the tab and it is gone.
Perfect for everyone
- Software developers writing test vectors
- Data engineers deduplicating records
- Marketers preparing hashed email lists for ad platforms
- Security students learning how digests behave
How to Use the Hash Generator
Pick an algorithm, type the text, copy the digest.
Choose an Algorithm
SHA-256 is the safe default for new work and what most APIs ask for. Pick SHA-1 only to match an older system, and SHA-384 or SHA-512 when a spec names them.
Type the Exact Text
Paste the text precisely as the other system will hash it, with no extra spaces or a trailing line break. A single invisible character changes the whole digest.
Read the Digest
The digest appears in lowercase hex as you type. Its length tells you the algorithm: 40 characters for SHA-1, 64 for SHA-256, 96 for SHA-384 and 128 for SHA-512.
Copy It and Compare
Copy the digest into your code, spreadsheet or ticket, or download it as a text file. When comparing with another digest, compare it case-insensitively, since some tools print uppercase hex.
Digests Computed by This Tool
These are inputs we hashed here, with the digests exactly as the tool returned them. Several are the published test vectors, so you can check them against any SHA implementation.
“abc”
“abc”
“abc”
“abc”
“The quick brown fox jumps over the lazy dog”
“The quick brown fox jumps over the lazy dog.”
“Café”
“Café ”
“hello world”
“password123”
SHA Functions and How Digests Behave
What each algorithm produces, where it is still used, and the properties that explain most surprising results.
SHA-1 Gives a 160-Bit Digest
SHA-1 prints as 40 hex characters. Google and CWI published a practical collision in 2017, so it is only for matching legacy systems, never for new security work.
“How long is a SHA-1 hex digest?”
SHA-256 Is the Modern Default
SHA-256 gives 256 bits, or 64 hex characters, and has no known practical collision. TLS certificates, Bitcoin and most API signing schemes rely on it.
“How long is a SHA-256 hex digest?”
SHA-384 Is a Shortened SHA-512
SHA-384 runs the SHA-512 engine with different starting values and keeps 384 bits. Subresource Integrity attributes and some government profiles specify it.
“How long is a SHA-384 hex digest?”
SHA-512 Is the Longest Option
SHA-512 produces 512 bits, or 128 hex characters. It works on 64-bit words, so it is often faster than SHA-256 on 64-bit processors.
“How long is a SHA-512 hex digest?”
MD5 Isn’t Offered
Browsers’ Web Crypto API deliberately has no MD5, and MD5 collisions can be made on a laptop. Use SHA-256 unless an old system forces MD5.
“Can this tool compute MD5?”
Small Changes Flip the Whole Digest
Adding one period to the quick brown fox sentence changes its SHA-256 from d7a8fbb3 to ef537f25. About half the bits change for any edit, which is called the avalanche effect.
“Do similar texts have similar digests?”
Empty Text Still Has a Digest
Hashing zero bytes is well defined, and every algorithm returns a fixed value for it. SHA-256 of nothing starts e3b0c442, a value worth recognising in logs.
“Is the SHA-256 of empty text blank?”
Line Endings Are Bytes Too
A Unix line break is one byte and a Windows one is two, so the same document saved on two systems can hash differently. Normalise line endings before comparing.
“Do LF and CRLF hash the same?”
Unicode Can Spell a Letter Two Ways
é can be one code point or e plus a combining accent, and the two forms hash differently even though they look identical. Normalise to NFC first when text comes from different sources.
“Do both forms of é hash the same?”
Hex Case Doesn’t Matter
A digest is a number, so ABCDEF and abcdef are the same value. This tool prints lowercase, as sha256sum does; compare digests case-insensitively.
“Is BA78 the same as ba78?”
Checksums, HMACs and Password Hashes
A plain hash is one tool among several, and picking the wrong one is a common security bug.
Plain Checksums for Integrity
A plain SHA-256 shows whether data changed, which is what this tool computes. It doesn’t prove who made the change, because anyone can recompute it.
HMAC for Signed Messages
Webhook and API signatures use HMAC, a hash mixed with a secret key (RFC 2104). This tool doesn’t do HMAC, so its digest won’t match a signature header.
Slow Hashes for Passwords
Passwords need a deliberately slow, salted function such as bcrypt, scrypt or Argon2. A fast SHA-256 of a password can be guessed billions of times a second on a GPU.
Git Object IDs
Git hashes a short header plus the content, so the SHA-1 of a file’s text here won’t match its blob ID. Git is also moving repositories to SHA-256.
Subresource Integrity Attributes
The integrity attribute on a script tag uses a Base64 digest such as sha384-…, not hex. Convert the hex from this tool with a Base64 encoder that reads bytes, or hash the file with openssl.
Hashed Identifiers for Matching
Ad platforms accept customer emails as SHA-256 of the trimmed, lowercased address. Matching works only when both sides normalise the text the same way before hashing.
Why Your Digest Doesn’t Match
Two digests that should match but don’t almost always differ in their input bytes.
A Hidden Trailing Newline
echo adds a line break, so echo abc | sha256sum hashes four bytes, not three. Use echo -n or printf to match this tool.
Windows Line Endings
Text copied from a Windows file may carry CR LF pairs that look like ordinary line breaks. Convert to LF before hashing if the other side uses Unix endings.
Leading or Trailing Spaces
A space copied from a spreadsheet cell is invisible but hashed. Trim the value first, then compare digests.
Different Unicode Forms
Text from macOS filenames is often decomposed, while most web text is composed. Normalise both inputs to NFC so é is a single code point in each.
Upper and Lowercase Hex
Some tools print digests in uppercase. A strict string comparison then fails even though the values are equal, so lowercase both first.
Comparing Different Algorithms
Check the length before anything else: 40, 64, 96 and 128 characters mean SHA-1, SHA-256, SHA-384 and SHA-512. Mismatched lengths mean mismatched algorithms.
Spot the Empty-String Digest
If a pipeline logs e3b0c44298fc1c14… for SHA-256, it hashed an empty value, usually a missing field or failed read. Searching logs for that prefix finds those bugs fast.
Curly Quotes From Documents
Word processors and PDFs swap straight quotes and apostrophes for curly ones, which are different UTF-8 bytes. Text pasted from a document can therefore hash differently from the same words typed in code.
What People Hash
Digests are handy whenever you need to compare text without comparing it character by character.
Preparing Hashed Email Lists
Ad platforms ask for SHA-256 hashes of trimmed, lowercase emails for customer matching. Hash one address here to check your export script normalises the same way.
Writing Unit Test Vectors
Compute an expected digest for a known string and assert against it in your tests. The FIPS vectors for abc are a good first check of any hashing code.
Finding Hidden Differences
Two config values that look identical but behave differently usually differ in whitespace. Hash both; different digests confirm a byte differs somewhere.
Building Cache and Dedupe Keys
A SHA-256 of a normalised record makes a short, fixed-length key for caches and duplicate checks. Hash a sample here to see what your key format looks like.
Checking a Pasted Fingerprint
Release notes and docs sometimes publish the SHA-256 of a short text value such as a license string or a config line. Paste it here to confirm your copy is the same.
Teaching How Hashes Behave
Change one letter and watch the digest change completely, or hash the same text in four algorithms side by side. It makes avalanche and digest length concrete for students.
Pseudonymising Values in a Report
Replace a customer ID with its hash before sharing a sheet, so rows still join but the raw ID isn’t visible. Remember that short or common values can be guessed back from their hashes.