WordPress Password Hash Generator
Type a new password to get a WordPress hash in the 6.8 bcrypt or older phpass format, check a password against any WordPress hash, and copy the SQL that sets it for a user.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Choose the format
In Create hash, pick WordPress 6.8 bcrypt, phpass, plain bcrypt or MD5.
- 2Type the new password
Enter a strong password; tick Show to check what you typed.
- 3Create the hash
Press Create hash and copy the result.
- 4Build the SQL
Open SQL for a locked-out admin, enter the table prefix and user login.
- 5Run it safely
Back up the database, run the statement in phpMyAdmin and log in.
- 6Verify a hash
Use Verify hash to test a password against any hash from wp_users.
About this tool
When the password reset email never arrives and you are locked out of your own WordPress site, the reliable fix is to put a new password hash straight into the database. This tool creates that hash in your browser. WordPress 6.8 and later store passwords as bcrypt with a $wp prefix, after pre-hashing the password with HMAC-SHA384; versions 2.5 to 6.7 used phpass portable hashes starting with $P$B. The generator produces either format, as well as plain bcrypt and plain MD5, which WordPress accepts once and upgrades at the next login. A verify tab checks whether a password matches any hash copied from the wp_users table, which helps when you inherit a site or debug a login problem. A third tab writes the SQL UPDATE statement for your table prefix and user login, ready to run in phpMyAdmin. Nothing is sent anywhere and nothing is stored.
WordPress 6.8 hashes
From version 6.8, released in April 2025, WordPress hashes new passwords with bcrypt through PHP's password_hash. Because bcrypt only uses the first 72 bytes of input, WordPress first computes an HMAC-SHA384 of the password with the key wp-sha384, base64-encodes it and bcrypts that string. The stored value starts with $wp$2y$10$, where 10 is the cost: each step up doubles the work. Older hashes keep working and are upgraded when the user next logs in.
phpass portable hashes
Earlier versions used phpass: the salt and password are hashed with MD5, then the result is hashed again with the password 8,192 times (the B after $P$ encodes that count), and the output is encoded in a custom base64. These hashes are much weaker than bcrypt against modern cracking hardware, which is one reason WordPress changed.
Resetting a password in the database
Open the database with phpMyAdmin or another client, find the users table (wp_users unless your site uses another prefix, shown in wp-config.php as $table_prefix) and replace user_pass for the right user_login. The tool writes the statement with quotes escaped. Take a database backup first, and log in straight away so WordPress can upgrade the hash if needed.
Worked example
A site owner locked out of the admin account creates a strong new password, chooses the WordPress 6.8 format with cost 10 and gets a hash starting $wp$2y$10$. With prefix wp_ and login admin, the tool writes UPDATE `wp_users` SET user_pass = '$wp$2y$10$…' WHERE user_login = 'admin'; which she runs in phpMyAdmin before logging in.
Limits
Use this only on sites you own or are authorised to manage. The tool does not crack hashes or recover old passwords, and it is not security advice for your whole site. Keep WordPress, plugins and themes updated, use unique strong passwords and two-factor authentication.
Worked example
New password hashed as $wp$2y$10$... and set with UPDATE `wp_users` SET user_pass = '...' WHERE user_login = 'admin';
Quick facts
- Category: Security & Privacy
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: WordPress 6.8 bcrypt announcement (make.wordpress.org, 2025), phpass portable hashes and bcrypt (Provos and Mazières, 1999)
Frequently asked questions
Which hash format should I use?
For WordPress 6.8 or later, the $wp$2y$ bcrypt format. For older sites, the $P$ phpass format. Plain MD5 works on all versions for an emergency reset and is upgraded at the next login.
Is my password sent anywhere?
No. Hashing runs in your browser with JavaScript and Web Crypto. The page stores nothing.
Why does the same password give a different hash each time?
Each hash uses a new random salt, so identical passwords produce different hashes. Verification still works because the salt is stored inside the hash.
What does the cost number mean?
It is the bcrypt work factor: each increase of one doubles the time to compute and to crack a hash. WordPress uses 10 by default.
Can this tool recover a forgotten password?
No. Hashes cannot be reversed. You can only set a new password or test whether a guess matches.
Where do I find the table prefix?
In wp-config.php, in the line $table_prefix = 'wp_'; many sites change it for security.
