Simple Secure Password Generator using JavaScript Free Source Code



This is a mini-project called Secure Password Generator App. This is a simple web application that can generate a secure password for users. This was developed using HTML, CSS, JavaScript. It has a simple and pleasant user Bootstrap v5 Framework and is easy to use. I am sharing this source code to give new programmers, especially the students or self-learners an Idea of how to create a simple JavaScript application like this.

About the Secure Password Generator App

I developed this project using the following:

  • HTML
  • CSS
  • JavaScript
  • Bootstrap v5
  • Font-Awesome

This Simple Secure Password Generator App has a simple form that contains the password's length and contained type of characters. The user has the choice to generate an AlphaNumeric Password, Uppercase Strings, Lowercase Strings, combined uppercase, and lowercase string, combined uppercase and lowercase string with special characters. Users can also copy the generated password into the clipboard.

Here, you can learn how to manipulate DOM in JavaScript and Generate Random String. The application user interface was developed with the bootstrap v5 framework. It also contains a simple validation upon generating a password with an invalid form fields value.


  • Password Generation Form
  • Password Contained Type of Characters Selection
  • Password Length input with a minimum of 8 and a maximum of 20
  • Display Generated Password
  • Copy Generated Password to Clipboard
  • Displays Copy to Clipboard Success Message

The source code was developed only for educational purposes only. You can download the source code for free and modify it the way you wanted.

Sample Snapshot of the Application

Secure Password Generator App

How to Run ??

  1. Download the provided source code zip file. (download button is located below)
  2. Extract the downloaded source code zip file in your desired location.
  3. Browse the Secure Password Generator App in a browser. i.e. file:///C:/users/default/desktop/password_generator/index.html

How to Use ??

  1. Enter your Desired Password Length. The Password length has a minimum of 8 and a maximum of 20.
  2. Next, select or check the type of characters you want your password to contain.
  3. Click the Generate Random Password button to generate the password. The generated password will be shown inside the generated password box/field above the for.
  4. Lastly, click the copy icon beside the generated password field/box to copy the generated password in your clipboard.


That's it. I hope this simple Secure Password Generator App in JavaScript will help you with what you are looking for and you'll find something useful for your future web application projects.

Explore more on this website for more Free Source Codes and Tutorials.

Enjoy :)

    Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

    Virus note: All files are scanned once-a-day by for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


    1. Re-scan downloaded files using your personal virus checker before using it.
    2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

    Add new comment