How to Make a Password Generator Tool in WordPress without Plugin?


With the password term, everybody is aware about it. Password is also called passcode which is used to login into the particular site which you have registered yourself. It must be the strongest one because it can’t be hacked by someone.

Here, tutorial to make strongest password generator tool in WordPress without using any plugin. Yes, it is possible to make a password generator tool in WordPress manually.

Steps to Make Strongest Password Generator Tool in WordPress

Step 1: Open WordPress website’s login page with the relevant login URL.

Step 1 - WordPress Website’s Login Page - Password Generator Tool

For Example:

Step 2: Login to admin panel of the website with the credential details.

Step 2 - Enter Credential Details - Password Generator Tool

After logged in you will be redirected on the website’s dashboard which looks like as below:

Step 2.1 - Dashboard - Password Generator Tool

Step 3: Now hover your mouse cursor on “Pages” and click on “Add New”.

Step 3 - Add New Page - Password Generator Tool

Step 4: Write an attractive title as per your choice.

Step 4 - Write A Title - Password Generator Tool

SEE ALSO:: Formulas to Create a Killer Headline

Step 5: Now click on “+” sign and write “custom html” in the search for a block box and add custom HTML block.

Step 5 - Add Custom HTML Block - Password Generator Tool

Step 6: After adding a custom HTML block just copy below code and paste into your custom HTML block.

 <label for="length">Password Length:
 <select name="length" id="length" oninput="generate_password()">
 <option value="8">8</option>
 <option value="9">9</option>
 <option value="10">10</option>
 <option value="11">11</option>
 <option value="12">12</option>
 <option value="13">13</option>
 <option value="14">14</option>
 <option value="15">15</option>
 <option value="16">16</option>
 <option value="17">17</option>
 <option value="18">18</option>
 <option value="19">19</option>
 <option value="20">20</option>
 <option value="21">21</option>
 <option value="22">22</option>
 <option value="23">23</option>
 <option value="24">24</option>
 <option value="25">25</option>
 <label for="special">
 <input type="checkbox" name="special" id="special" onchange="generate_password()" checked>
 Include Symbols (Ex: !@#$%^&*-)
 <label for="lowercase">   
 <input type="checkbox" name="lowercase" id="lowercase" onchange="generate_password()" checked>
 Include Lowercase (Ex: abcd)
 <label for="uppercase">   
 <input type="checkbox" name="uppercase" id="uppercase" onchange="generate_password()" checked>
 Include Uppercase (Ex: ABCD)
 <label for="numbers">   
 <input type="checkbox" name="numbers" id="numbers" onchange="generate_password()" checked>
 Include Numbers (Ex: 123456789)
 <label for="similar">   
 <input type="checkbox" name="similar" id="similar" onchange="generate_password()" >
 Include Similar Characters (Ex: IloO0)
 <h2>Generated Password</h2>
 <p id="result"></p>
 <button class="btn btn-primary" id="refresh">Generate Another Password</button>
     document.addEventListener("DOMContentLoaded", (event) => {
     var special = "!@#$%^&*-"
     var lowercase = "abcdefghijkmnpqrstuvwxyz"
     var numbers = "123456789"
     var similar = "lIoO0"
     var result = ''
     var refresh = document.getElementById('refresh')
     function generate_password(){
         let base = ''
         var e = document.getElementById("length");
         var plength = e.options[e.selectedIndex].value;
         if (document.getElementById('special').checked){
             base = base + special
         if (document.getElementById('lowercase').checked){
             base = base + lowercase
         if (document.getElementById('uppercase').checked){
             base = base + uppercase
         if (document.getElementById('numbers').checked){
             base = base + numbers
         if (document.getElementById('similar').checked){
             base = base + similar
         result = ''
         for (i=0; i < plength; i++){
         document.getElementById('result').innerText = result

Download Password Generator Tool Code

Step 6 - Place the Password Generator Tool Code

You can customize appearance, color, font and many more as per your choice.

After placing the password generator tool code, your page like as below:

Step 7: Now click on publish and your password generator tool is ready for use.

Step 7 - Click on Publish - Password Generator Tool

SEE ALSO:: How to Make Basic Contact Form for HTML Website?