Overview
Introduction
Before SCRAM became MongoDB's default authentication scheme, MONGODB-CR used a specific double-md5 construction that mixed in the username, structurally similar to PostgreSQL's legacy md5 password format elsewhere in this category.
This tool computes that exact MONGODB-CR hash from a username and password you provide, entirely in your browser, useful for old exports or legacy MONGODB-CR-configured systems.
What Is MongoDB Hash Calculator?
MONGODB-CR's underlying password hash is md5(username + ":mongo:" + md5(password)), a nested double-md5 construction where the inner hash covers just the password and the outer hash mixes in the username and a fixed literal separator.
It predates MongoDB 3.0's deprecation of MONGODB-CR in favor of SCRAM-SHA-1/256, and is what a legacy export or an explicitly downgraded --authenticationMechanism MONGODB-CR setup would still use.
How MongoDB Hash Calculator Works
The password is first hashed alone with MD5, producing a 32-character hex intermediate value.
That intermediate hex string is then concatenated with the username and the literal separator ":mongo:" (username + ":mongo:" + innerHash), and the combined string is hashed again with MD5 to produce the final 32-character hex output this tool returns.
When To Use MongoDB Hash Calculator
Use this when working with an old MongoDB export, migrating a legacy MONGODB-CR-configured system, or studying MongoDB's authentication history.
Don't rely on this format for anything new; MongoDB itself deprecated it in 2015 specifically because SCRAM's salted, iterated design is meaningfully stronger.
Often used alongside Postgres Hash Calculator, MySQL Hash Calculator and Random MongoDB Hash Generator.
Features
Advantages
- Exactly matches MongoDB's documented legacy MONGODB-CR hash construction.
- The username-mixing design at least prevents trivial cross-user hash matching for identical passwords, unlike a bare md5(password).
- Simple, deterministic, and easy to verify against a known legacy value or old export.
Limitations
- The username is a poor substitute for a genuine random salt, it's public and often guessable, so it doesn't meaningfully resist a targeted attack.
- MD5 is fast with no configurable work factor, unlike SCRAM's PBKDF2-based iteration count.
- Deprecated by MongoDB since version 3.0 (2015); this format is now specifically a legacy/compatibility concern, not current MongoDB security practice.
Examples
Best Practices & Notes
Best Practices
- Confirm the exact nested construction (inner md5 of password only, then outer md5 combining username, literal ':mongo:', and that inner hash) when reproducing this by hand.
- If you administer a MongoDB system still configured for MONGODB-CR, plan a migration to SCRAM-SHA-256.
- Never treat the username-mixing here as equivalent in strength to genuine random salting.
Developer Notes
Implemented as md5(UTF8(username + ':mongo:' + toHex(md5(UTF8(password))))) via @noble/hashes, matching MongoDB's documented MONGODB-CR construction exactly: an inner md5 of the password alone, then an outer md5 combining the username, a literal ':mongo:' separator, and that inner hash's hex string. Verified against a MONGODB-CR test vector (username 'alice', password 'secret123').
MongoDB Hash Calculator Use Cases
- Reproducing a legacy MONGODB-CR password hash from an old database export
- Debugging authentication on a system explicitly configured with --authenticationMechanism MONGODB-CR
- Understanding MongoDB's pre-SCRAM authentication design during a migration
- Comparing MONGODB-CR's username-mixing pattern against PostgreSQL's structurally similar legacy md5 format
Common Mistakes
- Getting the nested construction order wrong, the inner md5 covers only the password; the username and separator are mixed in only at the outer hash step.
- Assuming this format reflects current MongoDB defaults; version 3.0+ uses SCRAM-SHA-1/256 instead.
- Treating the username-mixing here as equivalent in strength to genuine random salting.
Tips
- If your target system is on MongoDB 3.0 or later with default settings, it's using SCRAM, not MONGODB-CR, confirm the configured authentication mechanism before assuming a match.
- This category's Postgres Hash Calculator uses a structurally similar username-plus-password pattern if you want to compare the two legacy database credential formats.