Source code to check password strength

We provide source code examples of how to check password strength using different programming languages.
Click on one of the links above.

How does it work?

Our scripts will test passwords and return a score which represents its strength.
The score goes from 1 (Very Weak) to 5 (Very Strong), and 0 if the value is blank. It will increase by 1 point if:

Note that if the password length is less than 4, the score will be limited to "Very Weak".