Developers · Gutenberg

Password Generator block for WordPress

Secure random password generator with configurable length, character types (uppercase, lowercase, numbers, symbols), strength indicator, copy button, and fully customizable styling.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Secure random password generator with configurable length, character types (uppercase, lowercase, numbers, symbols), strength indicator, copy button, and fully customizable styling.

Inspector panels on this block: Content, Password Options, Display Options, Sizing. Those titles come from index.js, not from a shared template.

Where to find it

Gutenberg inserter → Developers → search “Password Generator” (block name `blockenberg/password-generator` in block.json). Style it in the sidebar after insert.

How to use Password Generator block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Password Generator”, insert it. Category: Developers.
  3. Configure inspector controls that exist on this block. Open Content. Set “Show Title”, “Content — Title”, “Show Subtitle”, “Subtitle”.
  4. Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Show TitleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Content — TitleText field in the inspector. block.json default: Password Generator. Saved as `title`.
Show SubtitleOn/off toggle in the inspector. On by default. Saved as `showSubtitle`.
SubtitleText field in the inspector. block.json default: Generate a strong, secure random password instantly.. Saved as `subtitle`.
Copy Button LabelText field in the inspector. block.json default: Copy Password. Saved as `copyLabel`.
Copied Confirmation LabelText field in the inspector. block.json default: Copied!. Saved as `copiedLabel`.
Generate Button LabelText field in the inspector. block.json default: Generate New. Saved as `generateLabel`.
Default LengthNumeric range control in the inspector. Range 4–64. block.json default: 16. Saved as `defaultLength`.
Min LengthNumeric range control in the inspector. Range 4–32. block.json default: 6. Saved as `minLength`.
Max LengthNumeric range control in the inspector. Range 16–128. block.json default: 64. Saved as `maxLength`.
Include Uppercase (A-Z)On/off toggle in the inspector. On by default. Saved as `includeUppercase`.
Include Lowercase (a-z)On/off toggle in the inspector. On by default. Saved as `includeLowercase`.
Include Numbers (0-9)On/off toggle in the inspector. On by default. Saved as `includeNumbers`.
Include Symbols (!@#…)On/off toggle in the inspector. On by default. Saved as `includeSymbols`.
Exclude Ambiguous (0,O,l,1,I)On/off toggle in the inspector. Off by default. Saved as `excludeAmbiguous`.
Show Strength MeterOn/off toggle in the inspector. On by default. Saved as `showStrength`.
Show Length SliderOn/off toggle in the inspector. On by default. Saved as `showLength`.
Show Copy ButtonOn/off toggle in the inspector. On by default. Saved as `showCopyBtn`.
Show Refresh ButtonOn/off toggle in the inspector. On by default. Saved as `showRefreshBtn`.
Show Visibility ToggleOn/off toggle in the inspector. On by default. Saved as `showToggleVisible`.
Accent ColorColor control in the inspector. block.json default: #6c3fb5. Saved as `accentColor`.
Copy Button BackgroundColor control in the inspector. block.json default: #6c3fb5. Saved as `copyBtnBg`.
Copy Button TextColor control in the inspector. block.json default: #ffffff. Saved as `copyBtnColor`.
Generate Button BackgroundColor control in the inspector. block.json default: #f3f4f6. Saved as `genBtnBg`.
Password Field BackgroundColor control in the inspector. block.json default: #f5f3ff. Saved as `pwdBg`.
Password Text ColorColor control in the inspector. block.json default: #1e1b4b. Saved as `pwdColor`.
Weak Strength ColorColor control in the inspector. block.json default: #ef4444. Saved as `strengthWeak`.
Fair Strength ColorColor control in the inspector. block.json default: #f59e0b. Saved as `strengthFair`.
Good Strength ColorColor control in the inspector. block.json default: #3b82f6. Saved as `strengthGood`.
Strong Strength ColorColor control in the inspector. block.json default: #10b981. Saved as `strengthStrong`.
Card BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `cardBg`.
Section BackgroundColor control in the inspector. Saved as `bgColor`.
Card Radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `cardRadius`.
Button Radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 8. Saved as `btnRadius`.
Max Width (px)Numeric range control in the inspector. Range 300–900. block.json default: 560. Saved as `maxWidth`.
Padding Top (px)Numeric range control in the inspector. Range 0–160. block.json default: 60. Saved as `paddingTop`.
Padding Bottom (px)Numeric range control in the inspector. Range 0–160. block.json default: 60. Saved as `paddingBottom`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Password Generator block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Password Generator”. It sits under Developers. After insert, open Content and set “Show Title”, “Content — Title”, “Show Subtitle”, “Subtitle”.

Does Password Generator need a server or extra plugin?

No. After Blockenberg is active, the view script runs in the browser with the values you saved on the block.

Is the Password Generator Gutenberg block free?

Yes. Password Generator ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Password Generator to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Password Options, Display Options, Sizing).

Related developers blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Password Generator from the Gutenberg inserter.

Get Blockenberg