How to hash a string

Hashing turns any input into a fixed-length fingerprint — useful for verifying a download, comparing files, or storing a checksum. This guide explains what a hash is, which algorithm to use, and the one thing hashing is not.

The fastest way

Paste text into the Hash Generator and it computes MD5, SHA-1, SHA-256 and more at once. Read on for which one to trust.

Hashing is one-way (not encryption)

A hash function always maps the same input to the same output, but it cannot be reversed — there's no key and no way to get the original back. If you need to recover the data later, you want encryption instead, such as Text Encrypt / Decrypt.

MD5 vs. SHA-256

SHA-256 is the right default for anything security-related. MD5 and SHA-1 are broken — collisions can be deliberately engineered — so only use them as quick checksums to catch accidental corruption, never to protect anything.

Verifying a download

A common use is confirming a downloaded file matches the hash its publisher listed. Compute the file's hash and compare, or use the Checksum Verifier to check it against an expected value in one step.

A note on passwords

Hashing a password for storage is a server-side concern with salting and slow algorithms — but if you just want to gauge a password's strength, the Password Strength checker does that locally.

A note on privacy

The Hash Generator computes everything in your browser, so your input is never uploaded to a server.

Open the Hash Generator →

Common questions

What is a hash?

A hash is a fixed-length fingerprint of some input, produced by a one-way function. The same input always yields the same hash, but you cannot reverse a hash back into the original data. Hashes are used to verify integrity and to index data.

Is hashing the same as encryption?

No. Encryption is reversible with a key — you can get the original back. Hashing is one-way by design; there is no key and no way to decrypt a hash. If you need to recover the data later, you want encryption, not hashing.

Should I use MD5 or SHA-256?

Use SHA-256 for anything that matters. MD5 and SHA-1 are broken for security (collisions can be engineered) and should only be used as fast, non-security checksums for detecting accidental corruption.

Is my input uploaded when I hash it?

No. The hash is computed entirely in your browser, so the text or file you hash never leaves your device.