MD5 & SHA-256 Hash Generator

A hash function takes any text, of any length, and turns it into a short fixed-length string of characters called a digest. The same input always produces the same digest, and even a one-letter change produces a completely different one, which makes hashes useful for checking that a file or a message has not been altered. If you download a program and the publisher lists its SHA-256 hash, you can hash the file yourself and compare the two values: if they match, the file is intact; if they do not, something changed it. This free hash generator computes both the MD5 and the SHA-256 digests of any text you enter, instantly and entirely in your browser, so the text you hash is never uploaded or stored anywhere. MD5 produces a 32-character hexadecimal digest and has been around since 1992, while SHA-256 produces a 64-character digest and is part of the SHA-2 family used across modern security, from website certificates to blockchain systems.

The two are often shown side by side because older systems still publish MD5 checksums, while newer ones prefer SHA-256. It is important to know their limits: MD5 is broken for security purposes, because researchers have shown how to create two different inputs with the same MD5 digest, so it should only be used for simple checksums, never for passwords or digital signatures. SHA-256 is still considered secure. Neither hash can be reversed to recover the original text, and neither one is encryption. Type a word, a sentence or a whole paragraph below and see both digests appear.

Hash Results

Enter text above and click Compute.

MD5 (32 hex characters)—
SHA-256 (64 hex characters)—
Advertisement space — AdSense ads will appear here after approval.

What Is a Hash?

A hash is a one-way fingerprint of data. Feed in a single word or a whole book, and the function returns a fixed-length digest that looks random. Change one character of the input and the digest changes completely, a property called the avalanche effect, which is why hashes are so good at spotting changes. The same input always gives the same digest, so two people hashing the same file will get the same result and can compare them without sending the file itself. A good hash function also makes it practically impossible to find two different inputs with the same digest, or to work backwards from a digest to the original input. That is why hashes appear in password storage, where a system stores the hash of your password rather than the password itself, in version control, where every commit is identified by a hash, and in digital signatures.

MD5 Versus SHA-256

MD5 was designed in 1992 and produces a 128-bit digest, written as 32 hexadecimal characters. It is fast and widely supported, and it is still useful for quick checksums, such as confirming that a downloaded file matches the publisher's listing. However, MD5 is no longer safe for security: researchers have demonstrated collisions, where two different files share the same MD5 digest, so an attacker could in principle swap a file without changing its MD5. SHA-256, designed in 2001, produces a 256-bit digest, written as 64 hexadecimal characters, and no practical collision attack against it is known. Use SHA-256 whenever security matters, and treat MD5 as a legacy checksum only. Neither algorithm should be used on its own to store passwords; modern password storage uses slow, salted functions such as bcrypt or Argon2, because fast hashes like MD5 and SHA-256 can be brute-forced too quickly.

How to Use

  1. Type or paste the text you want to hash. It can be a word, a password you are checking, a sentence or a longer block of text. The box starts with the word "hello".
  2. Click Compute MD5 & SHA-256. Both digests appear below in lowercase hexadecimal, ready to compare with a published checksum.
  3. Change the text and compute again to see the avalanche effect. Changing "hello" to "Hello" or adding a full stop produces completely different digests, even though the inputs look almost identical.
  4. Click Copy Hashes to copy both values. Paste them into a document or a terminal to compare them with the checksum you were given.

Worked Example

Hash the word hello. The MD5 digest is 5d41402abc4b2a76b9719d911017c592 and the SHA-256 digest is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. Those are well-known test values, and this tool produces exactly those results, which is how you can check that the implementation is correct. Now hash Hello with a capital H instead. The MD5 becomes 8b1a9953c4611296a827abf8c47804d7 and the SHA-256 becomes 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969. Only one letter changed, yet both digests are completely different. Hashing an empty string is another useful test: MD5 gives d41d8cd98f00b204e9800998ecf8427e and SHA-256 gives e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855.

Frequently Asked Questions

What is the MD5 hash of hello?

The MD5 hash of the word hello is 5d41402abc4b2a76b9719d911017c592. This tool produces exactly that value, which is the standard test vector for MD5.

What is the SHA-256 hash of hello?

The SHA-256 hash of the word hello is 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. This tool computes SHA-256 with your browser's built-in cryptography feature.

Is MD5 secure?

No, not for security. MD5 is fine as a simple checksum, but researchers have shown how to create collisions, so it must not be used for passwords, digital signatures or anything where an attacker could benefit from a forged hash. Use SHA-256 instead.

Can a hash be reversed to get the original text?

No. Hash functions are one-way: the digest does not contain the original text, and there is no way to compute the input from the output. The only way to find an input that matches a digest is to guess inputs and hash them until one matches.

Is my text private when I use this hash generator?

Yes. MD5 is computed in JavaScript in your browser and SHA-256 uses your browser's built-in crypto feature. Your text is never uploaded, stored or shared.

Related Calculators

Disclaimer: This tool runs entirely in your browser. Your data is never uploaded or stored. Do not paste secrets, passwords or private keys into any online tool.