CAPTCHA alternatives: how to stop bots without a puzzle

Intermediate3 min readUpdated

GET /learn/captcha/captcha-alternatives/ Accept text/html text/markdown

Short answer

You can replace most CAPTCHA puzzles with checks the visitor never sees: a honeypot field and a minimum fill time on forms, rate limits per IP address and account, invisible browser challenges or proof of work, and device and network risk signals. Ask for an extra step, such as email confirmation, only when a request already looks risky.

A CAPTCHA puzzle asks every flagged visitor to prove they are human. Most alternatives move that work out of sight. The browser, the network and the pattern of requests answer the question, and the visitor sees an extra step only when the evidence is weak.

What can you use instead of a CAPTCHA?

  • Honeypot fields. A hidden input that people never see and simple bots fill in. Fits contact, comment and newsletter forms. See honeypots for bot detection.
  • Minimum fill time. Reject forms submitted faster than a person can type. Fits any form where autofill is unlikely.
  • Rate limits. Cap attempts per IP address, account and device. Fits login, password reset and one-time code endpoints. See rate limiting for bots.
  • Invisible challenges. A script checks the browser and issues a token or cookie, with no puzzle. How invisible JavaScript challenges work covers what they collect.
  • Proof of work. The browser spends some CPU time on a hash puzzle. Fits content sites under crawler load. See proof-of-work challenges.
  • Risk signals. Device fingerprint, TLS fingerprint, IP type and behaviour, combined into a score on each sensitive request.
  • Step-up checks. An email link or one-time code, only for risky requests. SMS codes invite SMS pumping fraud, so limit them per number and country.
  • Passkeys for login. WebAuthn credentials cannot be replayed from a leaked password list, which takes away the target of credential stuffing.
  • Privacy Pass tokens. A trusted issuer, such as the device platform, vouches for the client without revealing who it is. The protocol is standardised in RFC 9576 and its companions, and Apple's Private Access Tokens use it.
  • App attestation. For mobile apps, Apple App Attest and Google Play Integrity confirm that requests come from your real app on a real device.

How do you add a honeypot and a fill-time check?

Add a hidden field and a signed timestamp to the form:

html
<form method="post" action="/contact">
  <input type="hidden" name="form_stamp" value="1764000000000.9c1f0b...">
  <div class="hp" aria-hidden="true">
    <label for="website">Leave this field empty</label>
    <input type="text" id="website" name="website" tabindex="-1" autocomplete="off">
  </div>
  <!-- visible fields -->
</form>

Move .hp off screen with CSS (position: absolute; left: -9999px;). Some bots skip fields hidden with display: none. On the server, check both (Node.js):

js
import { createHmac, timingSafeEqual } from "node:crypto";

const SECRET = process.env.FORM_STAMP_SECRET;

export function issueFormStamp(now = Date.now()) {
  const ts = String(now);
  return `${ts}.${createHmac("sha256", SECRET).update(ts).digest("hex")}`;
}

export function looksAutomated(fields, now = Date.now()) {
  if (fields.website) return "honeypot";
  const [ts, sig] = String(fields.form_stamp || "").split(".");
  const expected = createHmac("sha256", SECRET).update(ts || "").digest("hex");
  if (!sig || sig.length !== expected.length || !timingSafeEqual(Buffer.from(sig), Buffer.from(expected))) return "bad-stamp";
  const age = now - Number(ts);
  if (age < 3000) return "too-fast";
  if (age > 2 * 60 * 60 * 1000) return "expired";
  return null;
}

Three seconds minimum and two hours maximum are starting points. Skip the fill-time check on login forms, where password managers fill fields instantly. Reply to caught submissions with the normal success page, so the bot gets no signal that it failed.

How do you add rate limits at the edge?

In nginx, limit requests to the login location per client IP address:

nginx
limit_req_zone $binary_remote_addr zone=login:10m rate=10r/m;

server {
    location = /login {
        limit_req zone=login burst=5 nodelay;
        limit_req_status 429;
        proxy_pass http://app;
    }
}

Ten requests a minute with a burst of five is a starting point. Bots spread across residential proxies send few requests per IP, so add limits per account and per device inside the application as well.

Which alternative fits which endpoint?

  • Contact, comments and newsletter: honeypot and fill time. Add an invisible challenge if spam continues, and double opt-in for newsletters.
  • Signup: invisible challenge, disposable email checks and device signals to catch repeat sign-ups. See how to stop fake account creation.
  • Login: rate limits per account and IP address, breached password checks, passkeys, and step-up for new devices.
  • Checkout and card forms: velocity limits per card, device and IP, plus your payment provider's risk tools.
  • Public content under crawler load: proof of work or an edge challenge, with verified search engine crawlers allowed.
  • APIs: keys, quotas and signed requests. Challenge pages break API clients.

Tools that help

StopBots is published by Kairal, which is one of the tools listed. The list is not a ranking.

  • Cloudflare Turnstile: a free invisible or managed challenge that replaces reCAPTCHA or hCaptcha widgets with few code changes.
  • Friendly Captcha: proof of work plus risk signals with no puzzles. The vendor states it is GDPR compliant and meets WCAG 2.2 AA.
  • ALTCHA: an MIT-licensed, self-hosted proof-of-work widget, free and enough for small sites that want no third-party calls.
  • Anubis: an open source reverse proxy that puts a proof of work in front of a whole site, built for sites under AI crawler load.
  • Kairal: device, network and behaviour signals with protection set per endpoint, invisible challenges instead of puzzles, and a preview mode that shows decisions before anything is blocked.

Common questions

CAPTCHA vs honeypot: which is better?

A honeypot costs real users nothing and catches scripts that fill in every field, but a bot that reads your HTML or renders the page can skip it. A CAPTCHA catches more of those at a cost to users. Many sites run the honeypot first and add a challenge only when spam still gets through.

Is there an open source CAPTCHA alternative?

Yes. ALTCHA is an MIT-licensed proof-of-work widget you host yourself, and Anubis, also open source, sits in front of your whole site and makes browsers solve a proof of work first. Neither sends visitor data to a third party, and neither tells you who the visitor is.

What is the best CAPTCHA alternative for accessibility?

Options with no task for the visitor: invisible challenges, proof of work and server-side risk scoring. For login, passkeys remove both the puzzle and the password. Keep a fallback route, such as an emailed link or a support contact, for visitors whose browser fails the check.