Password Strength Checker
Project Overview: Build a working password strength checker in Google Sheets using formulas, and learn the cybersecurity principles behind what makes a password strong or easy to crack. NOTE: Never enter real passwords into any tool! Always use made up example passwords for testing.
Materials:
A computer
A free Google account
Instructions:
Create a new blank spreadsheet, named “Password Strength Checker”, on sheets.google.com. In cell A1 type “Enter Password:” and leave cell B1 empty. The cell will instead be used to type passwords to test.
In cells A2 through A6, type the following labels, one per row:
At least 8 characters?
Contains uppercase letter?
Contains lowercase letter?
Contains a number?
Contains a special character?
In cell B2, type the following formula to check if the password is at least 8 characters long: =IF(LEN(B1)>=8,"✅","❌")
LEN counts the number of characters in the password. If it is 8 or more, it shows a checkmark. Otherwise it shows a cross.
In cell B3, type: =IF(REGEXMATCH(B1,”[A-Z]”),"✅","❌")
REGEXMATCH searches the password for any character matching the pattern. In this case, any uppercase letter from A to Z.
In cell B4, type: =IF(REGEXMATCH(B1,”[a-z]”),"✅","❌")
In cell B5, type: =IF(REGEXMATCH(B1,”[0-9]”),"✅","❌")
In cell B6, type: =IF(REGEXMATCH(B1,"[^a-zA-Z0-9]"),"✅","❌")
The [^a-zA-Z0-9] pattern means "anything that is NOT a letter or number".
In cell A7 type "Strength Score:" and in B7 type: =COUNTIF(B2:B6,"✅")
This counts how many criteria the password passed out of 5. A score of 5 means the password passed every check!
In cell A8 type "Strength Rating:" and in B8 type: =IF(B7<=2,"⚠️ Weak",IF(B7<=4,"🟡 Fair","✅ Strong"))
This uses nested IF statements to label the password as Weak, Fair, or Strong based on the score.
Select cell B8, then go to Format → Conditional formatting. Set it to highlight red when the cell contains "Weak", yellow for "Fair", and green for "Strong." Now your checker gives visual feedback just like a real tool!
Type some sample passwords into cell B1 and watch the checker evaluate them in real time. Which ones pass? Which ones fail? Do the results surprise you?