DEV Community

Ing. Pablo Cueto
Ing. Pablo Cueto

Posted on

I Built a Password Strength Analyzer API with Python + FastAPI

I Built a Password Strength Analyzer API with Python + FastAPI ๐Ÿ”

As a backend developer, I wanted to build something useful, real, and monetizable โ€” not just another tutorial project.

So I built a Password Strength Analyzer API that any developer can integrate into their app in minutes.

What it does

  • Returns a strength score from 0 (very weak) to 4 (very strong)
  • Estimates crack time using real-world attack scenarios
  • Detects if the password is in known breach lists
  • Returns actionable suggestions to improve security
  • Analyzes uppercase, lowercase, numbers and symbols

Tech Stack

  • Python 3.10+
  • FastAPI โ€” for the REST API
  • zxcvbn โ€” the same algorithm Dropbox uses
  • Pydantic โ€” data validation
  • Render โ€” cloud deployment

Example Request

curl -X POST "https://password-analyzern.onrender.com/analyze" \
     -H "Content-Type: application/json" \
     -H "X-API-Key: YOUR_API_KEY" \
     -d '{"password": "MyP@ssw0rd!"}'
Enter fullscreen mode Exit fullscreen mode

Example Response

{
  "password": "***********",
  "score": 3,
  "strength_label": "Fuerte ๐ŸŸข",
  "crack_time": "3 months",
  "suggestions": ["Idealmente usa 12 o mรกs caracteres"],
  "warnings": [],
  "length": 11,
  "has_uppercase": true,
  "has_lowercase": true,
  "has_numbers": true,
  "has_symbols": true,
  "is_common": false
}
Enter fullscreen mode Exit fullscreen mode

Try it for free

RapidAPI (free plan available):
https://rapidapi.com/PabsCueto/api/password-strength-analyzer1

GitHub:
https://github.com/PabsCueto/password-analyzer

Live docs:
https://password-analyzern.onrender.com/docs


Built this as part of my API portfolio. Feedback welcome!

Top comments (0)