Skip to Content

Creating a Password Strength Indicator


This tutorial utilizes strength.js to test the strength of your password and can be utilized on your own website's registration page.

This tutorial utilizes strength.js by Aaron Lumsden to test the strength of a password and can be utilized on your own website's registration page to inform users of the strength of their chosen password.

Below is the HTML, CSS, and JavaScript required.

Step 1 - Add the HTML below to your web page

Step 2 - Add the CSS below the main stylesheet of your website

Copy and Paste the CSS from our GitHub page at password-strength.css

Step 3 - Add the JavaScript below to a file called password.js

Step 4 - Add the includes below to the page where your password input lives


Matthieu McClintock
Contributions Editor here at Solodev. Want to be featured on the Solodev Blog? Get in touch.
Follow me on Twitter

Sign up to explore

Create an account in seconds and start building today.

Sign up for Solodev

Join the list

Get the latest updates on cloud, AI, and more.

Community

Connect with Solodevs across the social universe

Solodev Logo footer

Solodev helps developers around the globe build amazing customer experiences and collaborate on digital transformation, from code to cloud. The Solodev Platform provides the most complete ecosystem for developing apps and launching brands powered by cutting-edge technologies—including Cloud, CMS, AI, Blockchain, Digital, IoT, Metaverse, and Mobile.

©2025 Solodev. All rights reserved worldwide.