# hCaptcha

> Add a human-verification step to signup or contact forms that are attracting automated submissions.

Web page: https://buildladder.com/tools/hcaptcha

A mailing list can fill up with fake addresses if a program keeps submitting its signup form. hCaptcha checks visitors and can ask them to complete a challenge. Your site verifies the result before accepting the signup.

Add it to a test signup page and go through the flow on a phone. Check that a successful visitor can finish signing up and that someone whose check expires gets a clear chance to retry.

- Made by: hCaptcha
- Official site: https://www.hcaptcha.com
- Cost: Basic is free, as of November 2026. Pro is $99 a month billed yearly, or $139 month to month, with 100,000 checks a month included.
- What you need first: An hCaptcha account.
- Who it helps: If you want a free captcha that works with Supabase sign-in, or one that doesn’t come from Google or Cloudflare.
- When to skip it: If you don’t want visitors picking pictures. The free plan always shows a challenge. Its 99.9% Passive mode, which rarely shows one, needs Pro.
- Updated: 2026-11-10

## Stop bots with hCaptcha

Add an hCaptcha check to a sign-up, sign-in or contact form. A visitor who completes it gets a one-time code, called a pass. Your server confirms each pass with hCaptcha before it accepts the form.

What you’ll end up with: Your form shows an hCaptcha check, and your server refuses any submission without a valid pass.

### You’ll need

- A website or app with a form you want to protect, like sign-up or contact.
- Your AI tool, set up and working in your product’s folder.
- Server code that handles the form, or Supabase sign-in.
- hCaptcha account (https://dashboard.hcaptcha.com): Free to create

### Your part

- Sign up for hCaptcha and copy your sitekey and secret somewhere private.
- Add the real keys to your host’s settings.
- Test the form on your live site, and check that a made-up pass is refused.

### Step 1 of 3: Get your hCaptcha keys

This step is mine to do. Walk me through it, one action at a time:
- Go to hcaptcha.com and choose its free account option. Follow the account setup.
- After signing in, find the keys for your site and account.
- Copy the public sitekey and the private secret somewhere private, like a note only you can see.

It worked when: You have your sitekey and your secret saved somewhere private.

Keep for later: You need both keys again in “Add the keys to your host and test”.

If something goes wrong:
- You can’t find your sitekey later. Open Sites and select the site you are protecting.
- You lost the secret. hCaptcha doesn’t keep a copy you can view again. Open your account settings from the profile icon and choose Generate New Secret. Copy it before you leave the page. On the free plan you can do this once a day.
- You’re not sure which key is which. The sitekey is public. The account secret is private and may start with ES_.

### Step 2 of 3: Add hCaptcha and check it on the server

I want to protect a form in this product with hCaptcha. Read PLAN.md if there is one. Check hCaptcha’s current docs first. Don’t rely on memory.

Ask me which form to protect, like sign-up, sign-in or contact. Then:
1. If my sign-in uses Clerk, stop and tell me how to check Clerk’s own bot protection is turned on instead.
2. If my sign-in uses Supabase Auth, use Supabase’s built-in CAPTCHA support with hCaptcha. Pass the captcha token to the sign-up and sign-in calls, and tell me where to paste the secret in the Supabase dashboard.
3. Otherwise, add the hCaptcha widget to that form, and send its pass to my server with the form.
4. On the server, check every pass with hCaptcha’s siteverify endpoint before doing anything else. Send a form-encoded POST, not JSON, and include my sitekey. Refuse the form unless success is true, and show a friendly message asking the person to try again.
5. Reset the widget after each send, because each pass works only once.
6. Read the sitekey and the secret from environment variables. Make sure Git ignores .env, and tell me which name is public and which is secret.
7. On my computer, use hCaptcha’s test sitekey and test secret, because hCaptcha doesn’t accept localhost with real keys. Put those test keys in .env for me. They are public, so that is safe. My real keys go only in my host’s settings.
8. Never put the secret in code that runs in a browser or on a phone.

If my site sets a Content Security Policy, add the hCaptcha addresses its docs list. If my product has no server code, stop and explain my options before you change anything. Keep everything that already works.

It worked when: The hCaptcha widget shows on your form on your computer, and the form still sends when the check passes.

Before we move on, check with me:
- Did your AI tool show you the server code that calls siteverify, or the Supabase setting it uses?

If something goes wrong:
- The widget doesn’t load on your computer. hCaptcha blocks localhost with real keys. Use the test sitekey 10000000-ffff-ffff-ffff-000000000001 on your computer, and your real sitekey on your live site.
- Your AI tool only added the widget, with no server check. Say: “Add a server check with siteverify, and refuse the form unless success is true.” Without it, a bot can skip the widget.
- The browser console mentions a Content Security Policy. Your site blocks outside scripts. Say: “Add hcaptcha.com and *.hcaptcha.com to my Content Security Policy, as hCaptcha’s docs list them.”

### Step 3 of 3: Add the keys to your host and test

This step is mine to do. Walk me through it, one action at a time:
- Open your host’s environment variable settings. “Where do my API keys go?” in Answers names the page for Vercel, Netlify and Cloudflare.
- Add the sitekey and the secret, using the names your AI tool gave you. Mark the secret as secret if your host offers that.
- If you use Supabase sign-in, put the secret in Supabase instead. In Supabase’s Authentication settings, find Bot and Abuse Protection and turn on Enable CAPTCHA protection.
- Still in Supabase, choose hCaptcha as the provider, paste the secret, and click Save.
- Put your site online again from your host, so it uses the new keys.
- Open your live site in a private browser window and send the form. It should go through after the challenge.
- Ask your AI tool: “Send one request to my live form with a made-up hCaptcha pass, and show me the reply.” It should be refused.

It worked when: The form on your live site goes through for a real visitor, and a made-up pass is refused.

If something goes wrong:
- The live form fails the check for everyone. Check that the secret on your host is your real secret, not the test one, then put the site online again. Test keys only work with each other.
- Visitors say the picture challenges are annoying. You can set an easier difficulty level for your sitekey. Or compare Turnstile and reCAPTCHA in Security, under Concepts.

Compare hCaptcha with the other options: https://buildladder.com/concepts/security.md
