Hash Generator

Try an example:

UTF-8: 0 bytes · LF line breaks: 0

Hash results · live

Enter text or choose an example to calculate.

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

MD5 and SHA-1 have collision weaknesses; keep them for legacy compatibility. A plain hash does not authenticate a sender and should not be used directly for password storage.

What is Hash Generator?

A hash maps input bytes to a fixed-length digest. Identical bytes produce the same digest for the same algorithm; a small input change usually produces a very different result. Different inputs can still collide, so a digest is not a proof of unique content.

This tool calculates five algorithms from the UTF-8 text in your browser. SHA uses Web Crypto and MD5 loads on demand. MD5 and SHA-1 are included for legacy compatibility; their collision weaknesses make them unsuitable where collision resistance is required.

Worked example: verify the exact text being hashed

Choose “abc” to load three lowercase ASCII characters with no trailing newline. The input has three UTF-8 bytes: 61 62 63 in hexadecimal. Compare the MD5 and SHA-256 results below with the live output, then copy the algorithm your receiving system expects.

Choose “abc + newline” next. It adds one LF byte (0a), making four bytes and a different digest. The byte and newline counts above the results make this otherwise invisible difference easier to spot.

A newline changes the input bytes
InputUTF-8 bytesMD5
abc3900150983cd24fb0d6963f7d28e17f72
abc + LF40bee89b07a248e27c83fc3d5951213c1
Reference results for abc (no newline)
UTF-8: 61 62 63
MD5:    900150983cd24fb0d6963f7d28e17f72
SHA-256:
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Why another system can produce a different result

Compare the bytes before changing algorithms: letter case, leading or trailing spaces, line endings, an encoding marker and Unicode normalization can all change the digest. Two strings that look the same can have different Unicode representations. This tool encodes the textarea value as UTF-8 and does not trim or normalize the Unicode text.

The “Chinese + emoji” example contains 轻匣, a space and 😀, which occupy 11 UTF-8 bytes. Character counts and byte counts are not interchangeable. The SHA functions use Web Crypto; the MD5 library processes the same UTF-8 bytes.

A browser textarea represents line breaks as LF, including when pasted text originally used CRLF. This is a text tool, not a file checksum reader: it cannot certify the original bytes, encoding or newline format of an uploaded file. An empty textarea clears the results rather than calculating the empty-string digest.

Independent check in Node.js
const { createHash } = require('node:crypto');
const text = 'abc'; // No trailing newline
console.log(createHash('sha256').update(text, 'utf8').digest('hex'));

Choose an algorithm for the actual purpose

MD5 and SHA-1 remain available for matching legacy identifiers, but their collision weaknesses make them unsuitable when collision resistance is needed. Prefer SHA-256 or another appropriate modern hash when the receiving system supports it; a longer output is not a substitute for a secure protocol.

A plain digest can help compare content, but does not authenticate who sent it. If an attacker can replace both the text and its expected hash, comparing the two proves little. Authentication needs a trusted reference, a suitable MAC or a digital signature, depending on the system.

Hashing is not encryption. There is no general decode operation, but short or predictable inputs can be guessed and hashed until they match. Do not use a fast, unsalted hash from this page to store passwords; use a dedicated password-hashing scheme with salt and suitable work factors.

Output lengths in this tool
AlgorithmBitsHex characters
MD512832
SHA-116040
SHA-25625664
SHA-38438496
SHA-512512128

Frequently asked questions

Can a hash be reversed?

There is no general decoding operation. However, an attacker can guess short or common inputs, hash each candidate and compare it with the digest. Hashing alone does not hide a predictable secret.

Is MD5 still secure?

MD5 has known collision attacks. Use it only when a legacy system specifically requires it. SHA-256 is a better choice for modern content digests, but a plain digest alone is neither sender authentication nor a password-storage scheme.

References and example checks

Examples checked against this tool: .