Format Code Now
/

MD5 Hash Generator

HG-01

Type or paste text and get its MD5 hash straight away, as 32 hex characters or Base64. Use it to match an existing MD5 value or to spot a changed string, not to protect passwords.

Runs in your browser. Nothing is uploaded.

Text (hashed as UTF-8)

MD5 hash

How to use it

  1. Type or paste your text into the input box. Sample loads the quick brown fox example.
  2. The MD5 appears as you type. Under Output, pick lowercase hex, uppercase hex or Base64.
  3. Tick Ignore one trailing line break if your text came from a file or command that ends with a newline.
  4. Copy the hash, or download it as a .txt file.

What the hash is made from

The tool encodes your text as UTF-8 bytes and runs MD5 over them, so accents, non-Latin letters and emoji hash the same way as in most programming languages. The result is 128 bits: 32 hex characters, or 24 characters in Base64 ending in ==. The text is hashed exactly as typed. A trailing space or line break gives a different hash, which is the usual reason a value here does not match one from the command line. Tick Ignore one trailing line break to drop one.

When MD5 is fine and when it is not

MD5 is broken as a security tool. Researchers can build two different inputs with the same MD5 hash, and guessing against it is very fast, so it should not store passwords, sign data or check a download against an attacker. It is still used to catch accidental changes, remove duplicate records, build cache keys, and match values in older systems that require it. For anything an attacker could tamper with, use SHA-256 or a newer hash.

Checked against the standard test values

MD5 is not part of the browser's built-in crypto, so this page carries its own implementation of RFC 1321. It is tested against the values published in the RFC, such as d41d8cd98f00b204e9800998ecf8427e for empty text and 900150983cd24fb0d6963f7d28e17f72 for abc, and against Node's built-in MD5 on inputs of many lengths. It hashes text, not files. Open file is meant for text files, because the file is read as text first.

Questions people ask

How do I generate an MD5 hash online?

Type or paste your text into the input box. The MD5 appears right away as 32 hex characters, and you can switch the output to uppercase hex or Base64. Then copy it or download it as a .txt file. Nothing you type is uploaded; the hash is computed in your browser.

What is the MD5 hash of an empty string?

It is d41d8cd98f00b204e9800998ecf8427e. Clear the input box and this tool shows it, because empty text is valid input. It is a handy sanity check: if a system reports a different value for empty input, it is not computing plain MD5 over the raw bytes.

Why does my MD5 not match the one from the command line?

Usually a trailing newline. echo adds one, so echo abc | md5sum hashes four bytes, abc plus a line break. Use echo -n, or tick Ignore one trailing line break here. A different text encoding, or Windows line endings (CRLF), also changes the result.

Is MD5 secure for passwords?

No. MD5 is fast, so an attacker can test guesses at enormous speed, and different inputs with the same hash can be created on purpose. Store passwords with a slow, salted function such as bcrypt, scrypt or Argon2. MD5 is only suitable for catching accidental changes and matching legacy values.

Can an MD5 hash be decrypted or reversed?

No. A hash is not encryption and there is no key to undo it. Sites that seem to reverse MD5 only look the hash up in tables of values they computed earlier, so short or common inputs are found and long random ones are not. This tool only computes hashes; it does not look anything up.

How long is an MD5 hash?

An MD5 hash is 128 bits, which is 16 bytes. In hex that is always 32 characters, and in Base64 it is 24 characters ending in two = signs. The length does not depend on the size of the input, so a single letter and a long document both give 32 hex characters.

About this tool

MD5 is written out in this page's own code because the browser's built-in crypto does not offer it; it is checked against the test vectors in RFC 1321. MD5 is broken for security: different inputs with the same hash can be made on purpose, and it is fast enough to guess passwords by brute force. Do not use it to store passwords or to sign data. It is fine for spotting accidental changes and for matching an existing MD5 value. The text is hashed exactly as typed, as UTF-8, so a trailing line break or a space changes the result; "Ignore one trailing line break" removes one. It hashes text, not files: a file saved with different line endings would give a different hash than the same words typed here.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.