Format Code Now
/
Hash & generateWordPress Password Hash Generator Next: MD5 Hash Generator ›

WordPress Password Hash Generator

HG-34

Type a password to get a phpass hash in the $P$ format that WordPress has used for years. A second button checks whether a password matches a given hash.

Runs in your browser. Nothing is uploaded.

Password. To check a hash: the password, a line with only =====, then the hash

Password hash

How to use it

  1. Type the password into the input box.
  2. Pick the number of rounds. The default is 8192, which is the phpass default for WordPress.
  3. Press Make hash. Each press gives a different hash because the salt is random.
  4. To check a hash, put the password, a line with only =====, then the hash, and press Check password.
  5. Copy the result, or download it as a .txt file.

What the hash is

The portable phpass hash starts with $P$. The fourth character stands for the number of rounds as a power of two (B is 2^13, which is 8192), the next eight characters are the salt, and the last 22 are the result. The result is the MD5 of the salt and password, then MD5 repeated once per round with the password added each time, written in phpass's own Base64 alphabet. The checker reads the rounds from the hash itself, accepts the older $H$ prefix too, and stops at 2^20 rounds.

Where it is used and what it is not

A common use is resetting a WordPress login by pasting a new hash into the user_pass column of the users table in the database. The password is taken exactly as typed, as UTF-8; one trailing line break is dropped when making a hash. Newer WordPress versions can store a different, bcrypt-based format, which this tool neither makes nor checks. MD5 rounds are a weaker way to store passwords than bcrypt or Argon2, so treat this as a compatibility tool.

Error messages and what to do

MessageWhat it meansFix
Type a password to hash.The input box was empty when Make hash was pressed.Type the password to hash.
Put the password, then a line with only =====, then the hash below it.The check needs the password and the hash separated by a line holding only =====.Write the password, then =====, then the hash on the next line.
A $P$ hash is 34 characters long. Check that the whole hash was copied.The hash is shorter or longer than a phpass hash should be.Copy the full 34-character hash, with nothing around it.

Questions people ask

How do I generate a WordPress password hash?

Type the password and press Make hash. You get a string starting with $P$ that WordPress can verify. Every press gives a different value because a new random salt is used each time, and all of them are valid for the same password.

How do I reset a WordPress password with a hash?

Generate a hash here, then update the user_pass value for that user in the wp_users table of the database with it, for example through phpMyAdmin. Back up the database first. Use a phpass hash only if your WordPress version accepts that format.

Why is the hash different every time?

Each hash includes a random 8-character salt, which changes the result. A check does not compare strings: it re-computes the hash with the salt stored in the hash and compares. Use Check password to confirm that two different hashes both match one password.

What do the characters after $P$ mean?

The first one is the cost, a power of two: B means 2^13, which is 8192 rounds. The next eight are the salt. The remaining 22 characters are the result of the repeated MD5 steps in phpass's Base64 alphabet.

Can I check a password against an existing hash?

Yes. Put the password, a line with only =====, then the hash, and press Check password. It re-computes the hash from the hash's own salt and rounds and tells you whether they match. It works with $P$ and $H$ hashes, up to 2^20 rounds.

About this tool

Makes the portable phpass hash that WordPress has used for passwords, starting with $P$: a random 8-character salt, then MD5 repeated 2^n times (8192 times at the default), written in phpass's own Base64 alphabet. Each click gives a different hash because the salt is random, and the salt is made with crypto.getRandomValues. The checker also accepts the older $H$ prefix and reads the number of rounds from the hash itself, up to 2^20. The password is taken exactly as typed, as UTF-8, except that one trailing line break is dropped when making a hash. Newer WordPress versions can store a different, bcrypt-based format, which this tool neither makes nor checks. Nothing is stored or sent, but do not paste a live account password into a web page you do not control.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.