Honeypot Form Field Generator
Generate HTML+CSS snippets for an anti-spam honeypot field (input invisible to bots, accessible to humans) with optional timestamp.
Honeypot form fields: invisible spam filtering
A honeypot is a form field that no human ever sees but most spam bots happily fill in. The trick exploits a behavioural gap: simple bots scan the HTML and dump text into every <input> they find, especially fields with familiar names like website, url, phone2 or email_address. A real user, who relies on the rendered DOM, never touches the hidden field — so if the server receives a non-empty value, it can safely discard the submission as a bot.
A robust honeypot in HTML
Hiding the field is delicate. display:none and visibility:hidden are too obvious — modern bots check both before filling. The most effective recipe is to render the field off-screen but still in the layout, and to remove it from keyboard navigation:
<input type="text" name="website" tabindex="-1"
autocomplete="off" aria-hidden="true"
style="position:absolute;left:-9999px;
width:1px;height:1px;opacity:0;">
On the server, the check is a single line: if request.body.website is non-empty, reject as spam. Pair it with a time-based check: store the render timestamp in a hidden field and reject submissions that arrive in under 3 seconds — humans simply do not type that fast.
Pros and cons
- Pro: invisible to users — zero friction, unlike CAPTCHA puzzles or "I'm not a robot" checkboxes.
- Pro: free, no third-party calls, no privacy leak, no CSP allowance needed.
- Con: smart bots (Playwright, Puppeteer with humanized behaviour) read the rendered CSS and know to skip the field.
- Con: some screen readers may still announce the field — always pair with
aria-hidden="true"andtabindex="-1". - Pitfall: never name the trap field
password,emailorname— the browser's autofill will write into it for a real user and trigger a false positive.
Defence in depth
Honeypots are one layer, not a silver bullet. Production-grade anti-spam stacks combine:
- Honeypot + time-trap (catches dumb bots, ~90% of spam volume)
- Rate limiting per IP / per session (catches bursts)
- CSRF tokens (block cross-site replays)
- Cloudflare Turnstile or hCaptcha invisible for high-risk forms — modern alternatives to reCAPTCHA without picture puzzles
- Content scoring (Akismet for WordPress comments, custom Bayesian for others)
Where it ships in the real world
WordPress comment forms include honeypot logic via plugins like Antispam Bee and WPBruiser; the popular Contact Form 7 plugin has a built-in honeypot add-on. The CodeIgniter PHP framework documents a honeypot security helper. The 2024-2025 trend is to pair a honeypot with Cloudflare Turnstile, giving an effectively invisible CAPTCHA that catches the bots a honeypot misses, without ever asking the user to identify traffic lights.
FAQ
Can advanced bots see the honeypot? Yes — headless browsers driven by Playwright or Puppeteer can read the computed style and skip the trap. That is why you combine honeypot with timestamp checks and a real CAPTCHA on high-value forms.
Should I combine with reCAPTCHA? Honeypot first (catches the loud, cheap traffic) and an invisible CAPTCHA second (Turnstile or reCAPTCHA v3) is the recommended stack. Honeypot alone is enough for low-risk forms like newsletter signups.
Does it hurt accessibility? It can, if you forget aria-hidden="true". Some screen readers will read out an off-screen input and confuse the user. Always add ARIA attributes and a tabindex="-1".
What about math-problem honeypots ("What is 2+3?")? They catch many bots but they are CAPTCHAs in disguise and add friction. Worse, they are an accessibility nightmare for users with dyscalculia. Prefer the invisible-field approach.
Related Tools
nmap Command Builder
Build an nmap scan command with target, port range, scan type and service detection.
SSH Keypair Generator (Ed25519)
Generate Ed25519 SSH keypairs client-side ready to use in ~/.ssh/, with SHA256 fingerprint and OpenSSH format.
curl Form Builder
Build curl commands with multipart -F or urlencoded -d, including @file fields with content type.
fail2ban jail.local Generator
Generate a fail2ban jail.local snippet with filter, action, maxretry, bantime.
Guilloche Pattern SVG Generator
Generate interlocking guilloche patterns in SVG used in banknotes, certificates and stamps, with control over radii, nodes and rotational symmetry.
Screen Lock PIN Generator
Generate a numeric PIN avoiding weak sequences (1234, 0000, common dates, repeats) with security level options.