reCAPTCHA vs hCaptcha: Full Comparison
hCaptcha launched in 2019 as a privacy-first drop-in replacement for reCAPTCHA v2. Seven years on, the comparison is less straightforward — both services offer invisible and challenge-based tiers, both have free plans, and both integrate with PHP using nearly identical API patterns. What actually separates them is who owns your users' data and what happens to it.
Google built reCAPTCHA as a data collection mechanism. Bot detection is excellent — Google has more behavioural data than anyone — but that data feeds Google's advertising systems. hCaptcha's model is different: they sell completed challenge annotations as machine learning training labels. No ad profiles, clearer data flow, friendlier under GDPR. The choice comes down to whether you're already in Google's orbit and how much EU privacy compliance matters to you.
Quick Answer
Choose reCAPTCHA v3 if: you're already using Google Analytics, Firebase, or Google Cloud; your users are primarily outside the EU; you need maximum invisible verification accuracy; GDPR consent banners are already part of your stack.
Choose hCaptcha if: GDPR compliance is a concern and you want to avoid triggering cookie consent for the CAPTCHA; you want to avoid Google's data ecosystem entirely; you're building for an EU audience; you're OK with free-tier users solving image puzzles.
Comparison Table
| Feature | reCAPTCHA v3 | hCaptcha (Free) | hCaptcha (Enterprise) |
|---|---|---|---|
| Version / mode | Invisible, score-based | Image puzzle challenges | Invisible (like reCAPTCHA v3) |
| Cost | Free | Free | Paid (contact sales) |
| Privacy / data use | Google collects for ad targeting | Minimal data; sold as ML labels | Minimal data; sold as ML labels |
| User experience | Completely invisible | User solves image puzzles | Invisible |
| GDPR compliance | Requires consent banner in EU | Privacy-respecting; no banner needed in many cases | Privacy-respecting |
| PHP integration difficulty | Medium | Medium | Medium |
| Accuracy / dataset | Excellent (vast Google dataset) | Solid (smaller dataset) | Solid (smaller dataset) |
| Pays publishers | ✕ No | ✓ Yes (small amount) | ✓ Yes |
| Accessibility | Good — no visual challenge | ~ Audio alternative available | Good — no visual challenge |
Google reCAPTCHA v3 — Detailed Overview
reCAPTCHA v3 runs entirely in the background. When a user loads your page, the script collects behavioural signals — mouse movements, typing patterns, scroll behaviour, browser fingerprint, Google account status if signed in — and combines them into a risk score between 0.0 and 1.0. On form submission, a token rides along in the POST data. Your PHP server verifies it against Google's API and gets the score back. You decide what threshold means "bot" and act on it.
Scores give you more options than binary pass/fail. Low-confidence submissions can be routed to email confirmation, phone verification, or a manual review queue instead of hard-rejected. Fewer false positives for legitimate users with unusual browsing patterns.
reCAPTCHA v3 PHP Integration
<?php
$token = $_POST['g-recaptcha-response'];
$secret = 'YOUR_RECAPTCHA_SECRET';
$response = file_get_contents(
'https://www.google.com/recaptcha/api/siteverify?secret=' .
urlencode($secret) . '&response=' . urlencode($token)
);
$result = json_decode($response, true);
if (!$result['success'] || $result['score'] < 0.5) {
// likely a bot — reject or require additional verification
}
Pros: Invisible to users. Highest accuracy thanks to Google's data scale. Supported by every major PHP framework and CMS. Well-documented.
Cons: Google collects and uses the data for advertising — this is in their terms of service, not speculation. EU deployments require adding reCAPTCHA to your cookie consent and data processing disclosure. Score thresholds need ongoing tuning as bot tactics evolve. Sites with low user engagement (forums with lurkers, simple contact forms) see higher false-positive rates because there's less behavioural data to work with.
Full PHP guide: PHP reCAPTCHA Integration.
hCaptcha — Detailed Overview
hCaptcha's free tier shows users image challenges — the familiar "click all images containing a bicycle" interface. These challenges do double duty: verify the user is human, and generate training data sold to machine learning companies. The data pipeline is transparent, well-documented, and has nothing to do with advertising. hCaptcha Enterprise offers invisible verification like reCAPTCHA v3, using behavioural signals without user interaction, but requires a commercial agreement.
For PHP developers building GDPR-compliant applications, hCaptcha's privacy posture is meaningfully better. Their data processing isn't tied to an advertising ecosystem, and the privacy policy is written to support GDPR compliance rather than route around it. In many EU contexts, you can deploy hCaptcha without triggering cookie consent requirements — though check this against your own legal assessment as regulations shift.
hCaptcha PHP Integration
<?php
$token = $_POST['h-captcha-response'];
$secret = 'YOUR_HCAPTCHA_SECRET';
$response = file_get_contents(
'https://hcaptcha.com/siteverify',
false,
stream_context_create(['http' => [
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query(['secret' => $secret, 'response' => $token]),
]])
);
$result = json_decode($response, true);
if (!$result['success']) {
// CAPTCHA failed
}
Pros: Privacy-respecting data model. GDPR-friendlier than reCAPTCHA. Pays site owners per completed challenge. Drop-in replacement for reCAPTCHA v2 (same integration pattern). Audio accessibility alternative available.
Cons: The free tier adds real friction — users solve image puzzles, and form abandonment goes up compared to invisible solutions. Bot detection is solid but measurably weaker than reCAPTCHA v3 because Google simply has more data. Invisible verification requires paying for Enterprise. The publisher payments exist but are negligible for most sites.
Full PHP guide: PHP hCaptcha Integration.
PHP Implementation: Side-by-Side
Same pattern, both services: a front-end JavaScript widget generates a token on form submission, your PHP backend verifies it with a server-side API call. The differences are field names, endpoint URLs, and response structure.
reCAPTCHA v3 sends a GET request (token and secret as query parameters); hCaptcha uses POST with a form-encoded body. Both return JSON with a success boolean. reCAPTCHA additionally returns a score and action field; hCaptcha returns a hostname field for verification.
Migration is straightforward: swap the JS widget, rename the POST field (g-recaptcha-response → h-captcha-response), switch verification from GET to POST, update API keys. The structural logic — validate token, check success, reject on failure — stays the same.
If you're using a PHP framework with a CAPTCHA package (Laravel, Symfony, CodeIgniter), check whether it supports both services before committing. Many do, which makes switching trivial.
Privacy and GDPR
This is where the two services diverge most. Worth being specific about what "privacy" means in practice.
Google's reCAPTCHA processes your users' browser environment, behavioural patterns, and Google account status, transmitting all of it to Google's servers. Google's terms say this data improves reCAPTCHA and their security products, but Google's broader data policies apply too. Under EU GDPR interpretations from multiple data protection authorities (notably the German and French DPAs), embedding reCAPTCHA constitutes a data transfer to Google requiring informed consent. That means a cookie consent banner must cover reCAPTCHA, and users must consent before the script loads — a chicken-and-egg problem when you're trying to protect forms before consent is given.
hCaptcha's data processing is more contained. They collect what's needed for bot detection and sell completed challenges as ML training labels — disclosed upfront, not connected to ad profiles, with a cleaner data controller relationship. Several EU deployments run hCaptcha without GDPR consent banners, arguing the processing is necessary for legitimate interest (fraud prevention) and doesn't involve high-risk profiling. Verify with your own legal team, but the starting position is better.
If GDPR compliance is mandatory and you want invisible verification without consent overhead, neither reCAPTCHA v3 nor hCaptcha Enterprise fits — use Cloudflare Turnstile, which has the cleanest privacy posture of any external invisible CAPTCHA.
Verdict
If GDPR and user privacy matter: hCaptcha over reCAPTCHA. Cloudflare Turnstile is better still — each step away from Google's data ecosystem is a genuine improvement.
If you need maximum accuracy and don't mind Google: reCAPTCHA v3. Larger dataset, more mature models, invisible UX. If your users aren't primarily EU-based and you're already in the Google ecosystem, this is defensible.
If you want invisible verification with strong privacy: Cloudflare Turnstile beats both for most PHP deployments. See Cloudflare Turnstile vs reCAPTCHA for the full comparison.
If you need self-hosted / no external APIs: Neither reCAPTCHA nor hCaptcha works. Use Securimage or a honeypot instead.
Between these two specifically: hCaptcha is the better default. The accuracy gap doesn't justify the privacy cost for most sites, and the PHP integration is equally simple. Free-tier friction (image puzzles) is the real trade-off — if that's a problem, the answer is hCaptcha Enterprise or Turnstile, not reCAPTCHA.
See also: Full CAPTCHA Alternatives Guide, PHP reCAPTCHA Documentation, PHP hCaptcha Documentation.