Free & open source · v1.0.0

Bot protection that
stays on your server

LightCaptcha is a free, self-hosted CAPTCHA. No API keys. No third-party calls. Real users pass invisibly — bots get the puzzle.

Zero external calls PHP, Python & Node.js MIT licensed No dependencies
0
External API calls
3
Server languages
10
Bundled puzzle images
∞
Free, forever

Invisible first. Puzzle only when needed.

Most visitors never see a puzzle. LightCaptcha scores behavior silently and only shows the jigsaw challenge when something looks suspicious.

1

Page loads, fingerprinting starts

Mouse movement, timing, and interaction patterns are recorded silently in the background.

2

Behavioral score is evaluated

After a short window, the score is checked. Human-like behavior passes immediately — no puzzle shown.

3

Suspicious visitors get the puzzle

Bots and suspicious sessions are shown a jigsaw drag-to-place challenge before proceeding.

4

Signed token is verified server-side

On form submit, your server validates an HMAC-signed token. One function call — that's it.

Everything you need. Nothing you don't.

Built to be dropped into any PHP, Python, or Node.js project in minutes.

100% self-hosted

Your server. Your data. No calls to external services, ever. GDPR-friendly by design.

Invisible by default

Genuine users pass with no friction. The jigsaw puzzle only appears when behavior looks suspicious.

Jigsaw drag challenge

A simple, accessible drag-to-place puzzle. 10 bundled images, or point it at your own folder.

Zero dependencies

Pure JavaScript widget. No jQuery, no npm, no CDN calls. One script tag and you're done.

Light & dark mode

Auto-detects system preference, or set it manually. Looks right on any site.

PHP · Python · Node.js

Server libraries for all three. Same HMAC-based token design across every language.

Up and running in minutes.

Three steps: add the widget, run the verify endpoint, check the token on submit.

1. Add the widget to your form

<!-- In your <head> -->
<script src="/lightcaptcha/js/lightcaptcha.js"></script>

<!-- In your form -->
<div data-lightcaptcha
     data-lc-verify="/lightcaptcha/server/lightcaptcha-verify.php"
     data-lc-images="/lightcaptcha/images">
</div>

2. Verify on submit — choose your language

define('LIGHTCAPTCHA_SECRET', 'your-secret-key');
require_once 'lightcaptcha/server/lightcaptcha.php';

if (!LightCaptcha::check()) {
    http_response_code(400);
    die('Captcha verification failed.');
}

// Safe to process the form
Full documentation →

Ready to protect your forms?

Free forever. MIT licensed. Your data stays on your server.