Skip to the content

Contact usFree tools · No signup · Files stay on your device

Developer Tools

MD5 Generator: the complete guide to MD5 hashes (and when not to use them)

MD5 Generator: the complete guide to MD5 hashes (and when not to use them)

MD5 turns any text or file into a 32-character fingerprint. It is old, fast and still everywhere: in download pages, backup tools, caches and legacy systems. Our free MD5 Generator calculates it in your browser for text or for files of any size, and checks the result against a checksum you paste in. It is for developers, administrators and anyone who has been handed an MD5 value and needs to confirm a file.

It also comes with a clear warning, because MD5 is no longer safe for security. This guide covers how to use the tool, what each option does, and exactly where MD5 is fine and where it is not.

What MD5 Generator does

You give it text or a file and it shows the MD5 hash at the top of a list, highlighted. Under it, the same input is hashed with SHA-1, SHA-256, SHA-384 and SHA-512 for comparison, so you can pick whichever a system asks for.

It can:

  • Hash text as you type.
  • Hash a file of any size, in 4 MB pieces.
  • Show the result as lower-case hex, upper-case HEX or Base64.
  • Calculate HMAC-MD5 and the HMAC versions of the other hashes, using a secret key.
  • Compare the result with an expected value and show whether it matches.

It does not reverse a hash. MD5 is one-way, so there is no "decrypt" button, and no tool can honestly offer one.

How to use MD5 Generator, step by step

  1. Open MD5 Generator.
  2. Under Input type, choose Text or File.
  3. Type or paste text into "Text (hashed as UTF-8)", or press Choose file and pick a file.
  4. Read the MD5 row at the top of the Hashes panel and press Copy beside it.
  5. If you were given a checksum, paste it into "Compare with expected hash (optional)". A green "Match" note means your input equals the original.

For example, the text hello gives 5d41402abc4b2a76b9719d911017c592. With the box empty, the page shows d41d8cd98f00b204e9800998ecf8427e, which is the MD5 of an empty string, and a line tells you so.

Every option explained

Input type: Text or File

Text hashes what you type, as UTF-8. Bangla text, for example, is hashed as its UTF-8 bytes. A hint under the box shows the byte count, such as "5 bytes · updates as you type", and the result refreshes about 0.2 seconds after you stop typing.

File hashes the exact bytes of a file. Press Choose file, and the name and size appear with a Remove button. A bar and a "Hashing… 70%" label show progress. Because the file is processed in 4 MB chunks, the page stays responsive even with a very large file.

Output format: hex, HEX or Base64

All three are the same 128-bit value written differently. The lower-case hex form is 32 characters and is what md5sum prints. HEX is the same in capitals. Base64 is shorter, 24 characters ending in ==. Pick the one the other system expects; comparing against the wrong style is a common reason for a "mismatch" that is not one.

HMAC (with secret key)

Tick HMAC (with secret key) and a Secret key field appears. The panel becomes "HMAC results" and the rows become HMAC-MD5, HMAC-SHA-1 and so on. An HMAC mixes a secret into the hash so that only someone with the key can create or verify it. The "Key is" list lets you enter the key as Text (UTF-8) or as Hex bytes.

With the key secret as text and the message hello, HMAC-MD5 is bade63863c61ed0b3165806ecd6acefc. If you maintain an older system that signs requests with HMAC-MD5, you can use this to test your code. For anything new, choose HMAC-SHA-256 from the same list.

Compare with expected hash (optional)

Paste a published checksum. Capital letters are ignored for hex, spaces are ignored, and a leading 0x is allowed. Base64 values are compared as written, ignoring trailing =. The page compares against every algorithm in the list, so a match can appear on any row.

If nothing matches, the red note says "No match with any hash of this file" (or "text") and, for a 32-digit hex value, adds that its length fits MD5 and the input differs. Paste only the hash, not a line like hash filename.

What it accepts and its limits

  • Text: any text, hashed as UTF-8, with no trimming. A trailing space or newline counts.
  • Files: any type. For MD5 there is no size limit, because the file is streamed in 4 MB pieces.
  • Other hashes on big files: the SHA rows need the whole file in memory, so they are limited to 500 MB. Above that, they show "File is over 500.00 MB — too large for SHA hashing in the browser." and MD5 still shows its result.
  • Hex keys: may contain spaces, colons or dashes and an optional 0x. A bad key shows "The key contains characters that aren't hexadecimal (0–9, a–f)." or "A hex key needs an even number of digits."

Privacy

MD5 Generator runs in your browser. Your text, files and keys are not uploaded. The MD5 itself is calculated by code on the page, because browsers do not include MD5, and the SHA family uses the browser's built-in Web Crypto. To confirm on a computer, open the developer tools, go to the Network tab, hash a file and see that no request is made.

When MD5 is fine, and when it is not

The page shows a "not for security" label beside MD5 and SHA-1, and a warning below the results. Here is what that means in practice.

MD5 is fine for:

  • Spotting a damaged or incomplete download when the publisher gives an MD5 value.
  • Finding duplicate files, since two identical files always have the same hash.
  • Cache keys, ETags and quick lookups, where nobody is attacking you.
  • Matching an old system that demands MD5, such as a service that identifies users by the MD5 of a trimmed, lower-case email address.

MD5 is not safe for:

  • Passwords. MD5 is very fast, which helps an attacker. Unsalted MD5 password hashes can be cracked by looking them up in tables of common passwords. Use a slow hash such as Argon2, bcrypt or scrypt.
  • Digital signatures and certificates. Researchers can build two different files with the same MD5 in seconds, so a matching MD5 does not prove a file is untampered.
  • Proving a download is authentic. If someone can swap the file, they can often match the MD5 too. Use SHA-256 for that; the steps are in how to verify a download with its SHA-256 checksum.

Think of MD5 as a good way to find accidents and a poor way to stop people.

Why the hash changes when the text looks the same

  • Newline at the end. hello is 5d41402abc4b2a76b9719d911017c592, but hello plus a line break is b1946ac92492d2347c6235b4d2611184. Command-line examples often add the newline silently.
  • Capitals. Hello gives 8b1a9953c4611296a827abf8c47804d7, which has nothing in common with hello.
  • Line endings. Windows text uses CRLF, Linux uses LF. They are different bytes.
  • Encoding. The tool uses UTF-8. A program that hashes UTF-16 will not agree.

If the input came from a file, choose File instead of pasting its text.

Tips to work faster

  • Use the highlighted MD5 row for the answer and ignore the rest unless you need them.
  • Keep Output format on hex unless the system you are checking against shows capitals or Base64.
  • When comparing, paste into the compare box instead of checking by eye.
  • On the command line, the same value comes from md5sum file (Linux), md5 file (macOS) or Get-FileHash -Algorithm MD5 file (PowerShell).

Common problems and how to fix them

"No match with any hash of this file"

Check that you pasted only the hash, that the file is the exact one listed, and that the download completed. Then download again and re-check.

The result looks different from my code's result

Compare the input byte for byte: trailing newline, line endings, capital letters, encoding. For HMAC, also check whether your key is text or hex.

"The file couldn't be read (it may have been moved or deleted)."

Choose the file again. This appears when the browser can no longer read the file you picked.

Quick checklist

  • Use MD5 to catch accidents, not attackers.
  • Never use MD5 for passwords or signatures.
  • Choose File for anything that came from a file.
  • Paste only the hash when comparing.
  • Prefer SHA-256 whenever the publisher offers it.

Frequently asked questions

Is MD5 safe to use?
Not for security. Two different files can be made to share one MD5, so it must not be used for signatures, certificates or storing passwords. It is still fine for spotting accidental corruption, finding duplicate files and making cache keys.
Why is the MD5 of an empty input not empty?
A hash always has a fixed length. The MD5 of nothing is d41d8cd98f00b204e9800998ecf8427e, which is what the page shows while the text box is empty.
Why does my MD5 not match the one from my code?
Almost always the input bytes differ. Check for a trailing newline or space, CRLF versus LF line endings, capital letters, and the text encoding. This tool hashes text as UTF-8 exactly as typed.
Can I hash a file bigger than 1 GB?
Yes, MD5 has no size limit here. The file is read in 4 MB pieces, so it does not need to fit in memory, and a progress bar shows how far it has got.
Can I decrypt an MD5 hash?
No, because nothing was encrypted: MD5 is a one-way summary. Sites that claim to decrypt it only look the hash up in tables of known words and leaked passwords.
Found this useful? Share it

Tools in this guide

Main tool

MD5 Generator

Calculate the MD5 hash of text or files of any size and check downloads against a published MD5 checksum — with SHA-1.

Open tool

SHA256 Generator

Get the SHA-256 hash of any text or file in hex or Base64, sign messages with HMAC-SHA256,.

Open tool

Base64 Encoder/Decoder

Convert text or any file to Base64, or decode Base64 back to readable text or the original file.

Open tool

Back to all guides & blog