BL2.ru

md5 online, md4, sha1

func()

Online md5, md4, sha1, plus SHA-256, SHA-384 and SHA-512. Type the text you would like to "encrypt" into the input field and fields with MD5, MD4, SHA-1 and SHA-2 hashes appear automatically. Everything is computed in the browser; the text is not sent anywhere.

What a hash is

A hash function turns data of any size into a fixed-length string. The same input always gives the same hash, and the slightest change of the input changes the hash completely. The original text cannot be recovered from a hash, so this is not encryption but a "fingerprint" of the data.

Algorithms and examples

Hashes of the word hello (UTF-8):

AlgorithmBitsHex charshelloStatus
MD5128325d41402abc4b2a76b9719d911017c592broken (collisions)
MD412832—broken, obsolete
SHA-116040aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434dbroken (collisions since 2017)
SHA-256256642cf24dba5fb0a30e…62938b9824secure
SHA-384 / SHA-512384 / 51296 / 128—secure

The MD5 of an empty string is d41d8cd98f00b204e9800998ecf8427e; if you see it in a database, an empty value was hashed.

Where it is used

  • Checksums — verify that a downloaded file is intact (compare its SHA-256 with the one on the site).
  • ETags and caching — a content hash as a file version: app.5d41402a.js.
  • Deduplication — finding identical files and records by hash.
  • Cache keys and sharding — a short key from a long string.
  • Git (SHA-1, moving to SHA-256), signatures and certificates (SHA-256).

Good to know

  • MD5 and SHA-1 must not be used for signatures and certificates: collisions have been found — two different files with the same hash. They still detect accidental corruption, but not deliberate forgery.
  • Do not hash passwords with MD5 or SHA-*: they are too fast, and dictionary and rainbow-table attacks take minutes. For passwords use bcrypt or Argon2 (in PHP — password_hash() and password_verify()), which are slow and salted.
  • A hash depends on bytes: "Привет" in UTF-8 and in cp1251 gives different MD5s. An extra trailing space or newline is a different hash too.
  • In PHP: md5(), sha1(), hash('sha256', $s); in Linux: md5sum, sha256sum.

How to use the page

  • Type or paste text — all hashes are recalculated on the fly.
  • Copy the value you need in hexadecimal (hex) form.