Do you think third-party software generates truly random and safe passwords? No? Here’s how to make your own Secure password generator.
Simple passwords such as your birthday or the name of your pet are good enough. For each website, create a long, random, and unique secure password. Do not attempt this without the assistance of a password manager. Once you’ve properly stored all of your passwords in a manager, replace weak or common passwords to unique passwords that no one can guess.
We’ll use the SIGN() function to convert an ascending number sequence to a sequence of 1s. The TEXTJOIN() algorithm generates an eight-character secure password composed of random characters from the string D8. To connect the results, we utilize TextJOIN().
No additional knowledge is required to complete this simple project. It doesn’t use macros or anything fancy; it just uses standard Excel functions. Bad actors can read the password generator included in a publicly available password manager, but they cannot access your secure password.
Office 2019 and later will function similarly to the most recent version of Office 365. If you are unaware, Microsoft outlines how to obtain the most recent version (opens in a new window).
Make a Secure Password Generator Scaffold.
Please enter precisely what I mentioned below in the cells to ensure that the formulas work. After that, you can customize it to make it uniquely yours – and it will come with its own unique icons and text.

Enter “Random Password Generator” or whatever title you wish for your project in cell B1. add the labels “Length”, “Uppercase”, “Lowercase”, “Numbers”, and “Special Characters” starting in Cell B3 and working your way down. mention “Press F9 to regenerate” in cells B9 and B10 and it should look like this.
Add 20 or your selected default password length in cell C3. Fill in the next four cells with “Yes”. Now, in cell D4, enter all uppercase characters and all lowercase letters. In D6, enter ten numerals and any special characters you want to use in D7.

Add the Secure Password-Generating Formulas
It’s time to add the formulas now that the scaffolding is in place. To begin, we must build a text string containing all of the characters we intend to use. The formula for doing so appears to be complicated, but is actually quite long.
=IF(C4=”Yes”,D4,””) &IF(C5=”Yes”,D5,””) &IF(C6=”Yes”,D6,””) &IF(C7=”Yes”,D7,””)
The & operator joins text strings together. This formula says to add the character set if the next cell is yes to each of the four character sets. Change some of the Yes cells to No, Nay, or Meh right now. The string of characters that corresponds to what you performed changes.
Make secure password you can use of Excel Magic
I used a simple way to generate a random password when I first constructed this spreadsheet. I began with a formula that returns a random character from the string in cell D8:
=MID(D8,RANDBETWEEN(1,LEN(D8)),1)
This instructs Excel to produce a random number between one and the string’s length and return a character to that space. To trim the end to the appropriate length, I used the LEFT() method. There are 1,329 characters in the final formula!
My current method for generating a random secure password is only 78 characters long, thanks to some Excel magic I’ve learnt since then:
=TEXTJOIN(“”,TRUE,MID(D8,RANDBETWEEN(SIGN(ROW(INDIRECT(“1:”&C3))),LEN(D8)),1))
When you press F9 to recalculate, you’ll see a random password that changes – it doesn’t matter what type of password you choose.
Learn Some Excel Tricks
Do you want to know what makes that strange formula work? I can assist you with it. But first, I must confess, I’m not sure if this is the best method to go about doing what I did. Perhaps there is a more elegant solution.
Let’s start with the TEXTJOIN() function. The function concatenates an array of values as input. Before the array, there is a separator to separate the data and a true/false selector that tells whether to disregard empty values. This is a relatively new feature that requires Office 2019 or Microsoft 365.
=TEXTJOIN(“***”, TRUE, A1:A5)
Cell B1 displays the names A1 through A5 as a single string separated by three asterisks. Here’s another case in point.
=TEXTJOIN(” and “,TRUE,ROW(A1:A9))
How do you get an array of numbers ranging from 1 to 9? This technique can be used to create different types of number lists. The array A1:A9 is returned by the ROW() method as an array with a range of numerical returns.

We don’t, however, require a list of numbers. Excel must select a random character a set number of times. Again, this formula plucks a random character:
=MID(D8,RANDBETWEEN(1,LEN(D8)),1)
The SIGN() function returns 1 for any positive number, so we’ll use it to convert an ascending number sequence to a sequence of 1s. The TEXTJOIN() algorithm generates an eight-character secure password composed of random characters from the string D8. To connect the results, we utilize TextJOIN().
=TEXTJOIN(“”,TRUE,MID(D8,RANDBETWEEN(SIGN(ROW(1:8)),LEN(D8)),1))
We need a range from 1 to any value in C3 of any length instead of a 1:8 range. A simple INDIRECT() function does the trick. It takes a text string that describes a cell or location and returns it. And with that, the formula is finished.
=TEXTJOIN(“”,TRUE,MID(D8,RANDBETWEEN(SIGN(ROW(INDIRECT(“1:”&C3))),LEN(D8)),1))
Password Generator Fine-Tuning
There are various ways to improve its design and functionality. To begin, right-click the D above the D column and choose Hide from the option that appears. You no longer need to switch between character set lists and calculations.
In general, password generators should have upper and lower length constraints. Furthermore, if you enter anything other than a number in the Length parameter, the calculation will fail. We can make it right. Click the length cell C3, then click Data on the ribbon, then Data Tools, and finally Data Validation.

Set the minimum to 8 and the maximum to 64 by unchecking the Ignore Blank box. If you make a mistake, an informational error notice will appear. Copy the text to the clipboard, paste it into the Error Warning tab’s Error Message field, and then click OK.
Select “Yes, No” without quotes in the Source box. Uncheck the Show input message box at the top of the Input Message tab. Enter “Yes or No” as the error message on the Error Warning page. To finish, copy this cell and paste it into the three cells below it.
Each category also has a dropdown list from which you can select one of those values, and it’s possible to change the order they appear in.
Choose your favorite typefaces and add color to your secure password generator at this point. You could want to add some creativity and design to the password generator, so make it look less plain and simple.

You will need to highlight, right-click and Format Cells C3 through C7 (the longest cell and the four Yes/No cells). Uncheck the Locked check box and then click OK on the Security tab. Save the sheet by clicking Review on the ribbon.
In Google Sheets, Create a Password Generator
I’ve been an Excel genius since before Google Sheets existed. However, I deleted it to ensure that it supports our approach.
Creating a password generator in Sheets is difficult, but not impossible. Google recommends using F5 to force a refresh, which will reload the entire page or change the value of any cell. I followed the directions and discovered that everything worked perfectly, right down to the randomization formula.
It had to explicitly give an existing formula to the ArrayFormula() function in order for sheets to handle array computations. The formula for generating a random password is
=ArrayFormula(TEXTJOIN(“”,TRUE,MID(D8,RANDBETWEEN(SIGN(ROW(INDIRECT(“1:”&C3))),LE

I won’t get into specifics, but I was able to rewrite the data validation criteria as well as hide the superfluous columns. This method will work if you use Sheets instead of Excel.
You completed the task!
Whether you utilized the basic version of this spreadsheet or made some sophisticated changes, you now have your own password generator. True, Excel has a pseudo-random number generator, but you may supplement it by rolling a die and pressing F9 before accepting the created password. While a hacker may strive to reverse-engineer a password generator for a password management solution used by millions, this is unlikely to be your only usage. You succeeded!
FAQ
Is there a secure password generator?
Access from any location. LastPass is a free password generator that can be used on any computer, phone, or tablet. Anything you create and save on one device is instantly available on all others with LastPass Premium and Families.
How do password generators work?
A random password generator is a software application or hardware device that receives input from a random or pseudo-random number generator and produces a password automatically. Random passwords can be produced manually, using simple randomness sources such as dice or coins, or automatically, using a computer.
Does Google have a password generator?
Google Chrome provides the option to save passwords for all of your online accounts. As part of the Smart Lock feature, it then saves and syncs them to your Google account. Chrome also includes a password generator that generates strong passwords with the press of a button.
Why should I use a password generator?
A password generation software displays all of your credentials clearly. As a result, you won’t have to remember hundreds of passwords other than the generator’s login information. The basic goal of employing a generator is to generate strong, random passwords for all of your accounts.