Home / Secret Key Generators / WordPress

WordPress Salts & Security Keys Generator

Generate all 8 WordPress security keys and salts for wp-config.php in one block, ready to paste, entirely in your browser.

Free to use 100% client-side No account, no sign-up All 8 values, 64 chars each

WordPress Salts Generator

Click Generate to create your 8 keys and salts.

Where this goes

Open wp-config.php in the root of your WordPress install, find the block labeled "Authentication Unique Keys and Salts," and replace all 8 define() lines with the ones generated above. Save the file. Every currently logged-in user will be signed out, which is normal.

How this tool works

WordPress uses 8 values, 4 keys and 4 corresponding salts, to sign authentication cookies and protect the nonces used in forms and links. The 4 keys are required; the 4 salts are recommended, and WordPress will generate its own if they're left blank, but supplying real ones yourself is better practice. Each value here is 64 characters, generated from a broad set of letters, digits, and symbols via the Web Crypto API's crypto.getRandomValues() in your browser. The character set deliberately excludes single quotes and backslashes specifically so the output always drops safely into a PHP single-quoted string without needing any escaping, and it doesn't include literal spaces, for simpler, more predictable copy-paste behavior.

One thing worth being direct about, since it's a common point of confusion: these salts do not hash your stored user passwords. WordPress handles password storage through a separate mechanism entirely. What these values actually protect is session and form security, the things that keep a login valid and a form submission trustworthy.

Sources:

I based the eight keys and salts on the WordPress documentation for wp-config.php and wp_salt(), and generate them locally with crypto.getRandomValues(). Nothing is requested from WordPress.org. I recheck the docs when WordPress changes how these values are used.

Frequently asked questions

Do WordPress salts protect my user passwords?

No. WordPress uses a separate password-hashing system for stored passwords. These keys and salts secure authentication cookies and nonces, the tokens that keep you logged in and protect forms from misuse, not the password database itself.

What happens when I change these keys?

Every currently logged-in user, including you, gets logged out, since the cookies signed with the old keys stop validating. That's expected and often the point: it's a fast way to force a global sign-out after a suspected compromise. There's no need to rotate them on a fixed schedule; change them when trust in the current values is actually in question.