← All tools/Generators/Security/Hash Generator

Hash Generator

Hash any text with MD5, SHA-1, SHA-256 or SHA-512. Nothing leaves your browser.

Hashing runs entirely in your browser — MD5 and SHA-1 use built-in JavaScript code on this page, SHA-256 and SHA-512 use your browser’s crypto library. Nothing is uploaded.

SHA-256 digest

—

MD5—
SHA-1—
SHA-256—
SHA-512—

How it works

A hash turns any text into a fixed-length fingerprint. Change one letter and the fingerprint changes completely.
MD5 = 128-bit digest, 32 hex characters. SHA-1 = 160-bit digest, 40 hex characters.
SHA-256 = 256-bit digest, 64 hex characters. SHA-512 = 512-bit digest, 128 hex characters.
Hex = the digest written as hexadecimal digits. Base64 = the same bytes written in the shorter Base64 alphabet.

Worked example: Hashing “hello” gives SHA-256 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (64 hex characters), MD5 5d41402abc4b2a76b9719d911017c592 (32 hex characters) and SHA-1 aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d (40 hex characters). Hashing “helloo” instead gives a completely different SHA-256 digest, even though only one letter changed.

Frequently asked questions

What is a hash used for?

Checking that a file or message has not changed, storing passwords safely (as a hash, never as plain text) and fingerprinting data. If two texts have the same hash, they are almost certainly identical.

Which algorithm should I use?

SHA-256 for most purposes — it is the standard choice today. SHA-512 is stronger but longer. MD5 and SHA-1 are older and no longer trusted for security, but they are still handy for checksums and comparisons.

Can a hash be reversed to get my text back?

No. A hash is one-way: you cannot work out the original text from the digest. The only way to “reverse” one is to guess texts until one produces the same hash.

Is my text sent to a server?

No. MD5 and SHA-1 are computed by JavaScript code built into this page, and SHA-256 and SHA-512 use your browser’s own crypto library. Your text never leaves your device.

Why does the same text always give the same hash?

Hashing is deterministic — the same input always produces the same digest, on any computer. That is what makes hashes useful for checking that data has not changed.

More tools

Tell us what you think

Loving this tool, or stuck on something? Tell us — it takes a minute.

We’ll only use your name and email to reply if needed. The tool and page are filled in for you.