Hash Generator

Type or paste text to compute its cryptographic hash. Choose SHA-256, SHA-1, SHA-384 or SHA-512 — all computed in your browser with the Web Crypto API, so your input never leaves the device.

Enter text and press Generate hash.

What a hash is

A cryptographic hash function turns any input — a word, a paragraph, a whole file — into a fixed-length string of hexadecimal digits called a digest. The same input always produces the same digest, but the process is one-way: you can't reverse a digest back to the original text.

digest = H(message)

Good hash functions are deterministic, fast, and collision-resistant — it's effectively impossible to find two different inputs with the same hash, and changing a single character produces a completely different digest. That makes hashes ideal for verifying that data hasn't changed.

Worked example

The SHA-256 digest of the text Calcool:

Input: the 7 characters "Calcool".
Output: a 64-character (256-bit) hex string, shown above.
Sensitivity: changing it to "calcool" yields a totally different digest.

Choosing an algorithm

SHA-256 is the modern default and a good choice for checksums and integrity checks. SHA-384 and SHA-512 produce longer digests for higher security margins. SHA-1 is included for compatibility with older systems but is considered broken for security purposes and should not be used where collision resistance matters. None of these are password hashes — for storing passwords, a dedicated slow algorithm like bcrypt or Argon2 is required.

Tip: a hash is not encryption and can't be decoded back. To make data reversibly text-safe instead, use the Base64 encoder.

Frequently asked questions

Can a hash be reversed back to the original text?

No. Cryptographic hashes are one-way by design — there's no way to recover the input from the digest. They're used to verify data, not to store recoverable information.

Which hash algorithm should I use?

SHA-256 is the modern default for checksums and integrity. SHA-384 and SHA-512 give longer digests. Avoid SHA-1 for security, since it's no longer collision-resistant; it's offered only for legacy compatibility.

Is a hash the same as encryption?

No. Encryption is reversible with a key; hashing is one-way and keyless. Hashes verify integrity and detect changes, while encryption protects confidentiality.

Should I use this to hash passwords?

Not for storage. General hashes like SHA-256 are too fast for password storage. Use a purpose-built, slow algorithm such as bcrypt, scrypt or Argon2 with a salt instead.

MB
Mustafa Bilgic · Editor, Calcool
Hashes are computed with the Web Crypto API's crypto.subtle.digest. See the MDN SubtleCrypto reference. Everything runs in your browser — nothing you enter is uploaded, logged or stored.

Related calculators