CMS password hash generator
Create a password hash in the format your CMS uses, or paste a hash and test a password against it.
About CMS Password Hash Generator
When you lose access to a site or move a database, you sometimes need to write a password hash straight into a table. This page makes hashes in the formats used by WordPress (the older $P$ type and the bcrypt type from version 6.8), Joomla bcrypt, Drupal 7, phpBB 3 and the plain MD5 and SHA-1 forms found in old software. It can also test a password against a pasted hash and tells you which format it found. The output was compared with PHP's own functions and WordPress's phpass class. Everything runs in your browser.
- Resetting an admin password directly in the database.
- Checking a hash from your own database against a password you want to test.
- Testing a migration script that has to rewrite hashes.
- Seeing how a weak old MD5 or phpass hash compares with bcrypt.
How to use CMS Password Hash Generator
Step 1
Choose Make a hash, type the password and pick the format.
Step 2
Press Make hash and copy the result into the password column of your database.
Step 3
To test a hash, open Check a hash, paste the hash and a password, and read the result.
Good to know
- Use the newest format your CMS supports. Plain MD5, SHA-1 and phpass are cheap to guess and are here for old systems.
- bcrypt reads only the first 72 bytes of a password and cuts the rest. WordPress 6.8 avoids that by pre-hashing the password, and this page does the same.
- High bcrypt costs are slow in a browser, so checking stops at cost 14, and Argon2 hashes are not supported. Back up the old hash before you replace it.
Common questions
Which hash does WordPress use now?
From version 6.8 WordPress hashes new passwords with bcrypt and writes them with a $wp$2y$ prefix. It still accepts older $P$ hashes and upgrades them when the user next logs in.
Can I edit the hash in phpMyAdmin?
For WordPress, set the user_pass column of the user in the users table to the new hash. Take a database backup first, and note that the table name may carry a custom prefix.
Are my passwords sent anywhere?
No. Hashes are made and checked by your browser and nothing is sent to us.