Hash Generator (MD5 and SHA-256)

  • Matches NIST’s and RFC 1321’s printed test values, and OpenSSL for every length 0 – 300 bytes
  • Checked by Wayne Bickerton
  • Sources: NIST, IETF
  • Updated November 11, 2026

A hash generator turns any text into a short, fixed-length fingerprint, called a hash or message digest. The same text always gives the same hash, and changing a single letter changes it completely, so hashes are used to check that text or a download hasn’t changed. This page gives the SHA-256 (Secure Hash Algorithm, 256-bit) and MD5 (the MD5 Message-Digest Algorithm) hashes of whatever you type.

Hashed on your device. The text goes in this page’s link so a shared link shows the same hash: don’t type passwords or secrets.

SHA-256 hash
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad 256 bits

The SHA-256 hash of your text (3 characters, 3 bytes) is ba7816bf…

SHA-256
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
MD5
900150983cd24fb0d6963f7d28e17f72
Characters 3
Bytes (UTF-8) 3
Blocks of 512 bits 1

How a hash is calculated

Your text is first turned into bytes (UTF-8: one byte for each plain English letter, two to four for accented letters and emoji). Both MD5 and SHA-256 then pad the message: a 1 bit, then zeros, then the message’s length, so it fills whole blocks of 512 bits (64 bytes). Each block is mixed into the running result over 64 steps of shifting, adding and combining bits. Here it is with your text:

Blocks = (bytes + 8) ÷ 64, rounded down, + 1

Here it is with your numbers:

  1. Bytes (UTF-8) = 3
  2. Blocks = (3 + 8) ÷ 64, rounded down, + 1
  3. Blocks = 1
  4. SHA-256 = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

It means your 3 bytes were padded to 64 bytes and mixed, block by block, into a 256-bit result.

The result is shown in hexadecimal: 64 digits for SHA-256’s 256 bits and 32 for MD5’s 128. Line breaks count: “abc” and “abc” followed by a new line have different hashes.

Source NIST · FIPS 180-4, Secure Hash Standard (2015) ↗IETF · RFC 1321, The MD5 Message-Digest Algorithm ↗

MD5 and SHA-256 test values

The standards print hashes of a few short messages so anyone can check a hash tool. This page gives exactly these:

TextHashFrom
“abc”SHA-256 ba7816bf8f01cfea…NIST’s one-block example
“abcdbcdecdefde…”SHA-256 248d6a61d20638b8…NIST’s two-block example
“abc”MD5 900150983cd24fb0…RFC 1321 test suite
“message digest”MD5 f96b697d7cb7938d…RFC 1321 test suite
emptyMD5 d41d8cd98f00b204…RFC 1321: empty text

Source NIST · Example values, SHA-256 ↗

Is MD5 still safe to use?

MD5 dates from 1992. Researchers have since found ways to make two different messages with the same MD5 hash, so the IETF says MD5 must not be used where that matters, such as digital signatures. Using MD5 as a checksum against accidental errors is still acceptable. For anything to do with security, use SHA-256.

Source IETF · RFC 6151, Updated Security Considerations for MD5 ↗

FAQs

What is SHA-256?

SHA-256 is one of the Secure Hash Algorithms in NIST’s Secure Hash Standard (FIPS 180-4). It turns a message of any length into a 256-bit digest, and is called secure because finding a message that gives a chosen digest, or two messages with the same digest, is computationally infeasible.

Source NIST · FIPS 180-4, Secure Hash Standard (2015) ↗

Is SHA-256 always 64 characters?

Yes. A SHA-256 digest is always 256 bits, which is 64 hexadecimal digits, whether you hash one letter or a whole book. An MD5 digest is always 128 bits: 32 hex digits.

Is MD5 a weak hash?

For security, yes. Published attacks mean MD5 is no longer acceptable where collision resistance is required, such as digital signatures. It is still fine as a checksum to catch accidental changes, like a damaged download.

Source IETF · RFC 6151, Updated Security Considerations for MD5 ↗

What is better, SHA-256 or MD5?

SHA-256, for anything to do with security. MD5 has published collision attacks, and the IETF names SHA-256-based methods as the alternative to MD5-based ones. MD5 is shorter and still works for spotting accidental changes.

Sources

Related calculators