Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

WordPress Password Hash Generator & Checker

A new WordPress password hash and the SQL to set it — made in your browser.

Free, no sign-up On this device: nothing is sent
+3 +1 more details No uploadWorks offline once opened Security

Make a WordPress password hash

    Format

    WordPress uses PHP’s default. Any cost signs you in; if yours differs from the server’s default, WordPress rehashes the password at your next sign-in.

    Next steps Done. What next?

    Start over

    All security & privacy tools

    About the WordPress Password Hash Generator & Checker

    Locked out of a WordPress site but still able to reach its database (phpMyAdmin, Adminer or your host’s database tool)? Type a new password here and get the hash in the format your WordPress version stores, plus the UPDATE statement for the users table with your table prefix and user name. Paste it into the SQL tab, run it, and sign in with the new password.

    WordPress 6.8 and later store $wp$2y$… hashes: bcrypt over a SHA-384 pre-hash of the password, which this page computes exactly as WordPress core’s wp_hash_password() does. Older versions store phpass $P$… hashes, which current versions still accept. The Check tab tells you which format a user_pass value is in — $wp$, $P$, plain bcrypt $2y$ or a legacy 32-character MD5 — and whether a password matches it. The password never leaves your browser.

    How to use it

    1. Under Make a hash, type the new password (or press Suggest a strong password and save it in your password manager).
    2. Choose the format: WordPress 6.8 and later for current sites, or phpass if the site runs an older version or you are not sure — every version reads phpass, and 6.8+ upgrades it at your next sign-in.
    3. Press Make hash. Enter your table prefix (from $table_prefix in wp-config.php, wp_ by default) and the user name, e-mail or ID of your account to get the SQL statement.
    4. In phpMyAdmin, select the site’s database, open the SQL tab, paste the statement, press Go, and check that it says 1 row was affected. Then sign in with the new password.
    5. To check a password against a hash, choose Check a hash, paste the user_pass value and the password, and press Check password.

    Examples

    A WordPress 6.8 site, user admin
    Input
    Password: Corr3ct-horse-battery · format: WordPress 6.8 and later · prefix wp_ · user name admin
    Result
    UPDATE `wp_users` SET `user_pass` = '$wp$2y$12$…53 characters…' WHERE `user_login` = 'admin' LIMIT 1;

    A new random salt is used every time, so the hash changes each time you press Make hash — and every one of them works.

    Which format is this hash?
    Input
    $P$B/6k.2IU/XgFd2u157epkv90D2nWpM0 with the password “password”
    Result
    phpass portable hash ($P$), 8,192 rounds of MD5 — the password matches. WordPress 6.8 and later replace it with a $wp$2y$ hash at the next sign-in.
    An old MD5 value
    Input
    5f4dcc3b5aa765d61d8327deb882cf99
    Result
    Legacy MD5 — matches “password”. WordPress still accepts it and replaces it with a modern hash at the next sign-in.

    Common uses

    • Getting back into a WordPress admin when the password reset e-mail never arrives.
    • Resetting a client’s or a staging site’s administrator password from the hosting panel’s database tool.
    • Checking which hashing format a migrated or cloned site uses before switching WordPress versions or login plugins.
    • Confirming that a password stored for a test user really matches its hash.

    The formats WordPress reads

    • **$wp$2y$10$… or $wp$2y$12$… (63 characters)** — WordPress 6.8 and later. The password, with spaces at the ends removed, is pre-hashed with HMAC-SHA384 under the key wp-sha384, the result is base64-encoded, and PHP’s password_hash() hashes that with bcrypt; $wp is put in front. The cost is PHP’s default: 10 before PHP 8.4, 12 from PHP 8.4 (PHP manual).
    • **$P$B… (34 characters)** — phpass portable hashes, which WordPress wrote before 6.8: MD5 of an 8-character salt and the password, then 8,192 more rounds of MD5.
    • **$2y$… (60 characters)** — plain bcrypt written by some security plugins; checked with password_verify(), which uses only the first 72 bytes of a password.
    • 32 hexadecimal characters — a legacy MD5 hash (or one set with MD5() in SQL). WordPress compares any value of 32 characters or fewer with the MD5 of the password.

    WordPress 6.8 and later replace phpass, plain bcrypt and MD5 hashes with a $wp$ hash the next time the user signs in. Sources: WordPress core’s wp_hash_password() and wp_check_password() and class-phpass.php, and the WordPress 6.8 bcrypt announcement.

    Without phpMyAdmin

    With shell access, WP-CLI sets a password directly: wp user update admin --user_pass="new password" (it hashes it the way your WordPress version does; clear your shell history afterwards). In Adminer or a host’s own database tool, open the users table with your prefix (for example wp_users), edit the row of your account and paste the hash into user_pass instead of running the SQL.

    After a lock-out or a hack

    If someone else changed your password, a new password alone is not enough: check the list of administrator accounts for ones you do not know, update WordPress, themes and plugins, and replace the authentication keys and salts in wp-config.php so every existing sign-in is ended (the wp-config.php Generator makes a new set). Use a long, unique password and turn on two-step sign-in with a plugin you trust.

    Limitations

    • This page makes and checks hashes; it does not connect to your database or your site. You run the SQL yourself.
    • It cannot recover a password from a hash: bcrypt and phpass are one-way. It only tells you whether a password you type matches.
    • phpass hashes with more than 2^24 rounds are not checked here (WordPress writes 2^13).
    • Sites that replace WordPress’s password functions with a plugin (an older bcrypt plugin, an Argon2 filter, single sign-on) may store other formats; Argon2 hashes from PHP are checked, others are named as unknown.

    Privacy

    On this device: nothing is sent

    Passwords and hashes are processed in your browser (bcrypt runs in a background worker) and are never sent, logged or stored.

    Frequently asked questions

    Which format should I choose?

    If the site runs WordPress 6.8 or later, choose WordPress 6.8 and later ($wp$). If it runs an older version, or you are not sure, choose phpass ($P$): older versions read it, and 6.8 and later accept it and upgrade it to $wp$ bcrypt at your next sign-in. The WordPress version is shown on the Updates screen and in wp-includes/version.php.

    Can I just use MD5('new password') in phpMyAdmin?

    It still works — WordPress accepts a 32-character MD5 value and replaces it at the next sign-in — but until you sign in, the database holds an unsalted MD5 that is cracked in seconds if the table leaks. A hash from this page is salted and slow to crack from the start.

    Why is the hash different every time?

    Each hash has a new random salt inside it. That is intended: all of them work with the same password, and two users with the same password get different hashes.

    The SQL ran but I still cannot sign in. What now?

    Check that phpMyAdmin said 1 row affected (0 means the prefix or user name is wrong — look in the users table), that you edited the right database (wp-config.php names it in DB_NAME), and that no security plugin or single sign-on replaces the WordPress sign-in. Use Check a hash with the new user_pass value to confirm the password matches.

    Does WordPress trim spaces from passwords?

    Yes. wp_hash_password() hashes the password without spaces, tabs or line breaks at either end, and the sign-in form removes them too, so this page does the same and tells you when it did.

    Quick answers and tool search

    Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.