Skip to content
thecalculatorstudio

Hash Generator: MD5, SHA-1, SHA-256, SHA-384, SHA-512

Type or paste text and see its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once, as hex or base64. It all happens in your browser, and the text is never sent or saved.

Last reviewed

The text is hashed as UTF-8, in your browser. It is not sent anywhere or saved. A line break counts as a character, so a trailing newline changes the hash.

  • MD5 · 128 bits
    900150983cd24fb0d6963f7d28e17f72
  • SHA-1 · 160 bits
    a9993e364706816aba3e25717850c26c9cd0d89d
  • SHA-256 · 256 bits
    ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
  • SHA-384 · 384 bits
    cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
  • SHA-512 · 512 bits
    ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f

MD5 and SHA-1 are broken for security uses: NIST says SHA-1 should be phased out by the end of 2030. Do not use any of these fast hashes to store passwords; use Argon2id, scrypt, bcrypt or PBKDF2.

What a hash is

A hash function turns any amount of text into a short, fixed-length fingerprint. The same text always gives the same hash, a different text gives a completely different one, and there is no practical way to work back from the hash to the text. Hashes are used to check that a file or message has not changed, to identify content, and inside signatures and other security systems.

Type or paste text and this page shows its MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes at once. It works in your browser: the text is not sent anywhere, not saved and not put in the page address.

The five algorithms

Algorithm Output Defined in Status
MD5 128 bits, 32 hex digits RFC 1321 Broken for security: collisions can be made
SHA-1 160 bits, 40 hex digits FIPS 180-4 NIST says to phase it out by 31 December 2030
SHA-256 256 bits, 64 hex digits FIPS 180-4 In wide use
SHA-384 384 bits, 96 hex digits FIPS 180-4 In wide use
SHA-512 512 bits, 128 hex digits FIPS 180-4 In wide use

NIST announced in December 2022 that SHA-1 should be phased out by 31 December 2030 in favour of SHA-2 and SHA-3, because collision attacks have undermined it. MD5 has the same problem. They are fine for checking a download against a published value or for a non-security fingerprint, but not for anything an attacker could exploit.

Test values

These are the standard test results for the text abc:

Algorithm Hash of “abc”
MD5 900150983cd24fb0d6963f7d28e17f72
SHA-1 a9993e364706816aba3e25717850c26c9cd0d89d
SHA-256 ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
SHA-384 cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
SHA-512 ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f

The hash of empty text is also a well-known value. For MD5 it is d41d8cd98f00b204e9800998ecf8427e, and for SHA-256 it is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. If your tool gives another result for abc or empty text, it is hashing something different, such as extra whitespace or a line break.

Why your hash may not match

  • A trailing newline. abc and abc followed by a line break are different texts with different hashes. Command-line tools that add a newline are the usual cause.
  • Text encoding. The page hashes the UTF-8 bytes of the text, which is the usual choice. A tool using UTF-16 or Latin-1 will give another hash for any text with accented letters or symbols.
  • Case. The hex digits can be upper or lower case, and they are the same value. The page can show either, or base64.
  • Hashing a file. This page hashes typed or pasted text. A file’s hash is of its bytes, which can differ from its text.

Hashes are not for storing passwords

MD5, SHA-1 and the SHA-2 family are designed to be fast, which is the wrong property for a password. A fast hash lets an attacker try billions of guesses a second. OWASP says that fast hashing algorithms such as SHA-256 are not suitable for password storage, and recommends Argon2id first, then scrypt, bcrypt for legacy systems, or PBKDF2 where FIPS-140 compliance is needed. To make a strong password, use the password generator.

Common mistakes

  • Treating a hash as encryption. A hash cannot be reversed and cannot be decrypted, but a short or common text can be guessed and hashed to compare.
  • Using MD5 or SHA-1 where security matters. Pick SHA-256 or better.
  • Comparing hashes of different texts by eye. Copy and paste, or compare in code.
  • Forgetting that one character changes everything. That is how it is meant to work.

For other developer tools, see the UUID generator, the JWT decoder and the cron expression generator.

How it is made

The text is converted to UTF-8 bytes and padded as the standard requires: a single 1 bit, zeros, and the message length in bits. The bytes are then processed in blocks of 64 bytes for MD5, SHA-1 and SHA-256 and 128 bytes for SHA-384 and SHA-512. The SHA-2 constants are defined by the standard as fractions of square and cube roots of the first primes, and the page works them out exactly rather than copying them.

Frequently asked questions

What is the SHA-256 hash of "abc"?

ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad. The MD5 hash of "abc" is 900150983cd24fb0d6963f7d28e17f72 and the SHA-1 hash is a9993e364706816aba3e25717850c26c9cd0d89d. They are the standard test values.

Is my text sent to a server?

No. The hashes are worked out in your browser by code on this page. The text is held in memory only and is not sent, saved or added to the page address.

Why is my hash different from another tool’s?

Usually a trailing newline or a different text encoding. This page hashes the UTF-8 bytes of exactly what you type, with no added line break. A command-line tool that adds a newline gives a different hash.

Is MD5 or SHA-1 still safe?

Not for security. NIST says SHA-1 should be phased out by 31 December 2030 in favour of SHA-2 and SHA-3 because of collision attacks, and MD5 is broken in the same way. They are fine as non-security fingerprints.

Can I use SHA-256 to store passwords?

No. OWASP says fast hashes such as SHA-256 are not suitable for password storage. Use Argon2id first, then scrypt, bcrypt for legacy systems, or PBKDF2 where FIPS-140 compliance is needed.

Can a hash be reversed?

Not by calculation. But a short or common text can be guessed, hashed and compared, which is why unsalted hashes of weak inputs offer little protection.

Related calculators

Sources