MD4 Hash Generator
HG-15Paste text to get its MD4 hash, 32 hex characters long. MD4 is broken, so use it only to match an existing legacy value, never for security.
Runs in your browser. Nothing is uploaded.
Text (hashed as UTF-8)
MD4 hash
How to use it
- Type or paste your text into the input box. Sample loads the quick brown fox sentence.
- The MD4 hash appears as you type.
- Choose lowercase hex, UPPERCASE hex or Base64 for the output.
- Tick Ignore one trailing line break if your text ends with a newline you do not want hashed.
- Copy the result, or download it as a .txt file.
MD4 is broken
MD4 was designed by Ronald Rivest and published as RFC 1320. Collisions can be produced quickly, and it is fast enough to guess passwords by brute force, so it should not be used for signatures, integrity against an attacker or password storage. What it is still good for is reproducing a value an old system already produced: older versions of the rsync protocol, some legacy network protocols and the Windows NT hash all rely on it.
How this page computes it
Web Crypto does not offer MD4, and many OpenSSL builds have moved it to an optional legacy provider. This page includes its own implementation, written to RFC 1320 and checked against the test suite in that document. The result is 16 bytes: 32 hex characters, or 24 in Base64.
What gets hashed
The text is encoded as UTF-8 and hashed as typed, so a trailing space or line break changes the hash. A lone surrogate half is replaced with U+FFFD first. If you want the Windows NT hash of a password, use the NTLM page: it hashes the UTF-16LE bytes of the text, which gives a different value from this page for the same word.
Questions people ask
How do I generate an MD4 hash online?
Type or paste your text into the input box and the MD4 hash appears straight away. Pick hex or Base64, then copy it or download it as a .txt file. It is computed in your browser.
What is the MD4 hash of an empty string?
It is 31d6cfe0d16ae931b73c59d7e0c089c0. Leave the box empty to see it. It is the first test value in RFC 1320 and a handy check for any MD4 code.
Is MD4 secure?
No. Collisions for MD4 can be produced very quickly on an ordinary computer, and it is fast to brute force. Do not use it where an attacker matters. It remains only for compatibility with older systems.
What is the difference between MD4 and MD5?
MD5 was designed as a stronger successor, with four rounds instead of three and a different structure. They give different values for the same text and neither is considered safe for security today, though MD4 is the weaker of the two.
Is NTLM the same as MD4?
The NT hash is MD4, but of the password encoded as UTF-16LE, not UTF-8. The same word therefore gives a different value here than on the NTLM page. Use that page when you need the Windows value.
Why do I get a different MD4 than my command line?
Common causes are a trailing newline added by echo, a different text encoding, or an OpenSSL build with MD4 disabled that returns an error. Hash exactly the same bytes: tick the trailing line break option if echo added one.
About this tool
MD4 is written out in this page's own code, because Web Crypto does not offer it, and checked against the test suite in RFC 1320. MD4 is broken: different inputs with the same hash can be made quickly, and it is fast enough to guess passwords by brute force. Use it only to match an existing legacy value, for example in an old protocol, never for security. The text is hashed exactly as typed, as UTF-8 (a lone surrogate half becomes U+FFFD first), 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.