FormatterHQ

WordPress Password Hash Generator

Generate a password hash in the exact format WordPress stores — $wp$2y$ bcrypt for 6.8 and newer, or $P$ phpass for older versions — to reset your own site’s password.

Input TEXT
Output TEXT
Ready.

How to use the WordPress Password Hash Generator

  1. Type the new password into the input editor.
  2. Choose your WordPress version: 6.8 and newer (bcrypt) or 6.7 and older (phpass).
  3. Click Generate hash.
  4. Copy the hash and paste it into the user_pass column of your user in the wp_users table, then log in with the new password.

WordPress password hash generator

WordPress never stores passwords in plain text; the user_pass column of the wp_users table holds a salted hash. If you are locked out of your own site and cannot use the “Lost your password?” email — for example on a local or staging copy — you can set a new password by writing a freshly generated WordPress password hash into that column. This tool generates hashes in both formats WordPress uses.

Two formats, depending on your version

WordPress versionFormatExample
6.8 and newerbcrypt with a WordPress prefix$wp$2y$10$DUIQeb.h09VDd3Qcm2MJ3OKs06yCJCxkADT9YhFagXTvFA/bX1/7C
6.7 and olderphpass “portable” hash$P$BrWLgFJkWB8Sy7YoS99zH.y0QeLpSO0

WordPress 6.8+: $wp$2y$

Since version 6.8 (April 2025), WordPress hashes passwords with bcrypt through PHP’s password_hash(). To avoid bcrypt’s 72-byte limit, the password is first run through HMAC-SHA384 (with a fixed key) and Base64 encoded, and the result is bcrypt-hashed. The $wp prefix marks this pre-hashed format, so it is not interchangeable with a plain $2y$ hash.

WordPress 6.7 and older: $P$

Older versions use the phpass library’s portable hash: an 8-character salt and 8,192 rounds of MD5 (the B after $P$ encodes 2¹³ iterations). It is much weaker than bcrypt, but it is what those versions verify. WordPress 6.8+ still accepts phpass hashes and upgrades them to bcrypt the next time the user logs in, so a phpass hash also works as a fallback on new versions.

Resetting your admin password step by step

  1. Back up the database first.
  2. Open the database in phpMyAdmin, Adminer or your host’s database tool and find your user in the wp_users table (the table prefix may differ from wp_).
  3. Generate a hash here for a strong new password and paste it into user_pass, replacing the old value completely.
  4. Save, log in with the new password, and remove any temporary access you created.

If you have shell access, WP-CLI is simpler still: wp user update admin --user_pass="new password" hashes the password for you. You can also ask another administrator to send you a reset link.

Use it responsibly

Only change passwords on sites you own or manage with permission. Choose a long, unique password — a password manager or the Password Generator helps — and enable two-factor authentication on administrator accounts. Directly editing user_pass bypasses WordPress’s normal notifications, so tell other administrators what you changed.

The hash is computed locally in your browser; the password is never sent anywhere. To check an existing value, use the WordPress Password Hash Checker; for a standard bcrypt hash for other applications, use the Bcrypt Hash Generator, and for a strong password try the Password Generator.

Frequently asked questions

Which format should I choose?
Use the bcrypt ($wp$2y$) format for WordPress 6.8 and newer and phpass ($P$) for 6.7 and older. A phpass hash also works on 6.8+, which upgrades it on the next login.
Can I just put an MD5 hash in user_pass?
WordPress still accepts a plain 32-character MD5 hash and replaces it with a secure hash when you log in, but it is weaker while it sits in the database. Generating a proper hash here is the better option.
Why is the hash different each time?
Both formats use a random salt, so every generated hash is different. Any of them will verify correctly with the same password.
Is it safe to generate the hash on a website?
This tool computes the hash in your browser and does not transmit the password. Still, use a fresh password that you do not use anywhere else.

Last updated October 3, 2026

Related tools

WordPress Password Hash Checker Check if a password matches a WordPress user_pass hash ($wp$ bcrypt, $P$ phpass or legacy MD5). Memorable Password Generator Generate easy-to-remember passphrases from random English words, with separators, numbers and symbols. Password Generator Generate strong random passwords with custom length and character sets, using a cryptographically secure source. Password Strength Checker Estimate password entropy and crack time for online and offline attacks, and spot common patterns — checked privately in your browser. Adler-32 Hash Generator Generate the Adler-32 hash of any text or file online. Instant 32-bit checksum in hex, computed in your browser. Argon2 Hash Generator Hash and verify passwords with Argon2id, Argon2i or Argon2d using custom memory, iterations and parallelism. Runs locally via WebAssembly. SSL Certificate Decoder (X.509) Decode PEM or DER X.509 SSL/TLS certificates: subject, issuer, SANs, validity, key type, extensions and SHA-256 fingerprints. xxHash Generator Generate xxHash XXH32, XXH64, XXH3 and XXH128 hashes with an optional seed. Bcrypt Hash Checker Check whether a password matches a bcrypt hash, like PHP password_verify, entirely in your browser. Bcrypt Hash Generator Generate a bcrypt password hash ($2y$) with a configurable cost factor, compatible with PHP password_hash and Laravel. BLAKE2b Hash Generator Generate BLAKE2b hashes (128–512 bits) with optional keyed MAC mode, from text or files. BLAKE2s Hash Generator Generate BLAKE2s hashes (128–256 bits), the 32-bit-optimised BLAKE2 variant, with optional key.