Invalid captcha: what it means, and how to fix it.
You finish the captcha, press submit, and the form comes back with “invalid captcha”, “captcha failed” or “captcha verification failed”. On a form protected by hCaptcha, that means the site’s server asked hCaptcha whether your token was good and got a no, or had no token to ask about. This page covers what causes that and how to fix it, first for the person seeing the message and then for the developer running the site.
What “invalid captcha” means
When you pass an hCaptcha challenge, the widget puts a token in a hidden form
field called h-captcha-response. Your browser sends it along with the
rest of the form. The site’s server then posts that token, with the
site’s secret key, to hCaptcha’s siteverify endpoint, and
gets back JSON with success: true or success: false and
an error-codes list. That flow is described in
hCaptcha’s
developer docs, and our siteverify
guide walks through it step by step.
hCaptcha does not write the message you see. The site does. hCaptcha’s docs
tell sites to check error-codes and “return an appropriate error
message to the end user, or a generic error message if no details are specified
in error-codes.” So “invalid captcha”, “incorrect
captcha”, “bad captcha” and “captcha validation
failed” are one event under different names: the server-side check said no.
It is rarely about which pictures you clicked. The docs say the token is added to the form “when a challenge is successfully passed”; a wrong answer gets you another round inside the widget, not a token. By the time you can submit, the puzzle part is done, and what failed is the token.
The usual causes
| What went wrong | What siteverify says | Who can fix it |
|---|---|---|
| The token was older than its lifetime | expired-input-response | You: redo the check and submit right away |
| The token had already been checked once | already-seen-response | You: reload and redo it. The site: verify once |
| No token was sent (check not done, or blocked) | missing-input-response | You: finish the check, allow the widget |
| The token was damaged, fake or not a token | invalid-input-response | The site, or the script that filled the form |
| The site’s domain is not on the sitekey’s allowlist | invalid-input-response | The site owner |
| Sitekey and secret do not belong together | sitekey-secret-mismatch, not-using-dummy-secret (the docs say not-using-dummy-passcode) | The site owner |
| Your country is blocked for that sitekey | geo-restriction-mismatch | You: VPN off. The site owner: the rule |
The token expired
hCaptcha’s error table describes expired-input-response as a
token that “is expired. (120s default)”. If you solve the captcha
first and then spend a few minutes on the rest of the form, the token can be dead
by the time you press submit. The widget can tell the page when this happens (the
expired-callback fires “when the passcode response expires and
the user must re-verify”), but not every site uses it, so the checkbox can
still look ticked.
The token was already used
The docs say “tokens can only be used once”, and a second check of the
same token returns already-seen-response. Ways to hit this without
meaning to: pressing submit twice, going back and submitting the same page again,
or a form that comes back with a different error (a wrong password, a taken
username) and keeps the old token in place. The first submit spent the token,
so the next one fails.
No token was sent
If the check never finished, the field is empty and siteverify
answers missing-input-response. We got exactly that when we sent an
empty response field. You may have skipped the checkbox, or something
stopped the widget from loading or completing: an ad blocker, a DNS filter, Brave
Shields, strict tracking protection.
hCaptcha not working covers those one
by one.
The site’s setup refuses it
Some causes sit with the site owner, and nothing on your side changes them:
- Keys that don’t match. The docs say a sitekey from one
account cannot be validated with another account’s secret
(
sitekey-secret-mismatch). Test keys only work with the test secret (not-using-dummy-passcodein the docs table). - A domain allowlist. hCaptcha’s configuration docs describe restricting a sitekey to listed hostnames, and requests from any other hostname “fail verification with the invalid-input-response error code”. On 2 November 2026 the docs said this setting “will be released soon”.
- Country rules. On hCaptcha Pro a site can
allow or block
countries, and a blocked token fails with
geo-restriction-mismatch. A VPN exit in a blocked country triggers it. - A risk score. On Enterprise,
siteverifyalso returns a score. The token can be valid and the site can still refuse you because of the score, with the same kind of message.
If a script fills the form
For automation the same rules apply, and a few more mistakes are common: a token
minted for a different sitekey or page (hCaptcha recommends sites send the
sitekey parameter so that tokens “issued on one sitekey”
can’t be “redeemed elsewhere”), a token that sat in a queue past
its lifetime, one token shared across several jobs, or a token put in the wrong
field. Each submit needs its own token, used once, soon after it was issued.
Fixes if you see it on a site
- Do the captcha last. Fill in everything else first, then tick the box or solve the puzzle, then press submit straight away.
- Reload instead of going back. After a failed submit, reload the page so the site renders a fresh widget, and press submit once.
- Make sure the check finished. If the box stays empty or the
spinner never stops, allow
hcaptcha.comin your ad blocker or DNS filter, or try a private window with extensions off. - Turn off the VPN for that site. A blocked country or a poor score both look like an invalid captcha. Switching network also works. Why am I getting hCaptcha explains the reputation side.
- If nothing works, it’s the site. If it fails in a clean browser on another network, the site’s keys or rules are probably wrong. Tell the site; you can’t fix that from your end.
Fixes if it is your site
Start with the raw siteverify response. Many wrappers turn every
failure into one generic message, and the error-codes list is what
tells you which cause you have. Each code is explained in
hCaptcha error codes. Then check:
- Verify once, right after the form arrives. Don’t check
the token in middleware and again in the handler, and don’t retry
siteverifywith the same token. After any failed submit, callhcaptcha.reset()so the visitor gets a fresh token. - Handle expiry in the page. Register an
expired-callbackand reset or ask again, so nobody submits a token that is already past its lifetime. - Post a form, not JSON. The docs say “Do not send JSON
data”. When we sent JSON,
siteverifyanswered that both the secret and the token were missing. - Pair the keys. Sitekey and secret from the same account, test keys only with the test secret, production keys in production.
- Send one IP in
remoteip. When we sent the valueunknown, or a comma-separated forwarding chain, it came back asinvalid-remoteip. - Check the dashboard rules. A domain allowlist or a country block refuses tokens that are otherwise fine.
For the token itself (format, lifetime, single use), see what an hCaptcha token is. If visitors report the widget never loads, see hCaptcha not working; if they say it keeps asking, see hCaptcha keeps appearing.
What siteverify returned when we tried
On 2 November 2026 we called https://api.hcaptcha.com/siteverify
with hCaptcha’s published
test keys and changed one thing at a
time. Every call returned HTTP 200; the failure is in the body.
curl https://api.hcaptcha.com/siteverify \
-d "secret=0x0000000000000000000000000000000000000000" \
-d "response=10000000-aaaa-bbbb-cccc-000000000002" {
"success": false,
"error-codes": ["invalid-input-response"]
} | What we sent to siteverify | What came back |
|---|---|
| Test secret and the dummy token | success: true |
| The same dummy token a second time | success: true again |
| The dummy token with its last character changed | invalid-input-response |
FAKE-TOKEN, the string hCaptcha’s docs suggest | invalid-input-response |
An empty response field | missing-input-response |
No secret field | missing-input-secret |
| The dummy token with a different secret | not-using-dummy-secret |
| The same fields as JSON instead of a form | missing-input-response, missing-input-secret |
remoteip set to unknown, or to two addresses | invalid-remoteip |
| The Enterprise “Bot Detected” test pair | success: true, score: 1, score_reason: ["bot"] |
Two things from that run are worth knowing. The test keys don’t enforce
single use: the dummy token verified twice, so a test-key setup can’t show
you already-seen-response or expired-input-response;
those two come from hCaptcha’s docs, not from our run. And with a wrong
secret the live response said not-using-dummy-secret, while the docs
table calls the error not-using-dummy-passcode, so match on both if
your code checks for it.
reCAPTCHA and Turnstile say it too
Google reCAPTCHA and Cloudflare Turnstile work the same way: a token in the form,
checked by the site’s server, and a site-written message when the check
fails. Their error codes and token lifetimes are their own, and this page covers
hCaptcha only. To see which one a form uses, look at the widget’s logo or
the hidden field’s name: hCaptcha’s switching guide notes that
g-recaptcha-response becomes h-captcha-response. The
differences are laid out in hCaptcha vs
reCAPTCHA and hCaptcha vs
Turnstile.
For automation: a token that passes the check
If your script hits “invalid captcha”, it needs what a person’s browser has: a valid hCaptcha token for that sitekey and page, used once, inside its lifetime. NoneCap, an hCaptcha solver service, returns one through its solve API for the sitekey and URL you send, newly minted for each request:
curl "https://api.nonecap.com/v1/solves?wait=90" \
-H "Authorization: Bearer $NONECAP_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "hcaptcha",
"sitekey": "f5ab1c2d-7e8f-4a9b-b1c2-d3e4f5a6b7c8",
"url": "https://target.example/signup"
}'
Request it right before you submit, put token in
h-captcha-response, and send the form with the solve’s
user_agent as your User-Agent header. Enterprise sitekeys take the
site’s rqdata too. A solve that returns no token is never
charged. The Node SDK and the
Python SDK wrap the same call.
Last updated November 2026.
Frequently asked
What does “invalid captcha” mean?
siteverify. The usual reasons are a token that expired (120 seconds by default), one that was already used, or a check that never finished because something blocked the widget. Redo the check and submit straight away.What does “captcha failed” or “captcha validation failed” mean?
siteverify returns success: false. hCaptcha’s docs tell sites to show “an appropriate error message to the end user, or a generic error message”, which is why one site says “invalid captcha” and another says “captcha verification failed”.Does “incorrect captcha” mean I picked the wrong pictures?
Why does captcha keep failing?
How long is an hCaptcha token valid?
expired-input-response as a token that “is expired. (120s default)”, and its docs say tokens “can only be used once”. So a token is good for one check, within about two minutes of the challenge. More in what an hCaptcha token is.Can a VPN cause an invalid captcha error?
geo-restriction-mismatch. Enterprise sites can also get a risk score back from siteverify and decide themselves what to do with a high one. Turning the VPN off for that site is the quickest test.