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: 

  1. 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. 

  2. In cells A2 through A6, type the following labels, one per row:

    1. At least 8 characters?

    2. Contains uppercase letter?

    3. Contains lowercase letter?

    4. Contains a number?

    5. Contains a special character?

  3. In cell B2, type the following formula to check if the password is at least 8 characters long: =IF(LEN(B1)>=8,"✅","❌")

    1. LEN counts the number of characters in the password. If it is 8 or more, it shows a checkmark. Otherwise it shows a cross. 

  4. In cell B3, type: =IF(REGEXMATCH(B1,”[A-Z]”),"✅","❌")

    1. REGEXMATCH searches the password for any character matching the pattern. In this case, any uppercase letter from A to Z.

  5. In cell B4, type: =IF(REGEXMATCH(B1,”[a-z]”),"✅","❌")

  6. In cell B5, type: =IF(REGEXMATCH(B1,”[0-9]”),"✅","❌")

  7. In cell B6, type: =IF(REGEXMATCH(B1,"[^a-zA-Z0-9]"),"✅","❌")

    1. The [^a-zA-Z0-9] pattern means "anything that is NOT a letter or number".

  8. In cell A7 type "Strength Score:" and in B7 type: =COUNTIF(B2:B6,"✅")

    1. This counts how many criteria the password passed out of 5. A score of 5 means the password passed every check!

  9. In cell A8 type "Strength Rating:" and in B8 type: =IF(B7<=2,"⚠️ Weak",IF(B7<=4,"🟡 Fair","✅ Strong"))

    1. This uses nested IF statements to label the password as Weak, Fair, or Strong based on the score.

  10. 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!

  11. 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?

Previous
Previous

Homemade String Telephone

Next
Next

How to Build Your Own Electromagnet!