AH JavaScript Password Strength Check: Calculate and display the strength of a password

Recommend this page to a friend!
  Info   View files Example   Demos   View files View files (9)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 79%Total: 127 All time: 373 This week: 5Up
Version License JavaScript version Categories
ahpwcheck 1.2GNU General Publi...5HTML, Forms, Security
Description Author

This object can calculate and display the strength of a password.

It can listen to changes in a given form password input.

When the user enters a new password, the object calculates a factor that determines the strength of the password based om given requirements and displays messages to let the user know about the password quality.

The object can consider requirements like length of typed characters, upper and lower case characters, digits and special characters.

The message templates can be changed to support other languages. The output of the messages can be customized with CSS. It also allows changing the requirements for a check, as well the weights for scoring.

Innovation Award
JavaScript Programming Innovation award winner
October 2016
When a user enters a password on a site, it is often useful to let him know how easy it may be to guess that password, so the user enters a better one.

This object can show the strength of a given password as the user enters it on a form input.

It can configure the strength parameters based on the number of letters, digits and punctuation that the user entered.

Manuel Lemos
Picture of Axel Hahn
  Performance   Level  
Name: Axel Hahn <contact>
Classes: 3 packages by
Country: Switzerland Switzerland
Age: 50
All time rank: 1262 in Switzerland Switzerland
Week rank: 6 Up1 in Switzerland Switzerland Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x


password check (ahpwcheck.class.js)


Javascript class for optical verification of an entered password. You can define count of required letters, digits and special chars. This class shows fulfilled requirements while a user types his (new) password.

* Author: Axel Hahn * project home: <https://github.com/axelhahn/ahpwcheck> * licence: GNU GPL * see documentation: <http://www.axel-hahn.de/docs/ahpwcheck/index.htm>


watch a password field and show requirements

var oPwCheck = new ahpwcheck(aOptions);
    [id of password field],
    [id of div for output]

Show a score

var oPwCheck = new ahpwcheck(aOptions);

see example html files in the package and the section Get started in the documentation: <http://www.axel-hahn.de/docs/ahpwcheck/get_started.htm>

  example 1External page  

Open in a separate window

  Files folder image Files  
File Role Description
Plain text file ahpwcheck.class.js Class Class source
Plain text file ahpwcheck.class.min.js Class Class source
Accessible without login Plain text file example.css Data Auxiliary data
Accessible without login Plain text file example.html Example Example script
Accessible without login Plain text file example2.html Example Example
Accessible without login Plain text file example3.html Example Example script
Accessible without login Plain text file example4.html Example Example script
Accessible without login Plain text file example5.html Example Example script
Accessible without login Plain text file readme.md Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:373
This week:5Up
User Ratings User Comments (1)
 All time
Congratulations, this is a amazing class ;-)
6 years ago (Josť Filipe Lopes Santos)