django-recaptcha
Django recaptcha form field/widget app.
What it is and what it does
Django reCAPTCHA is a form field and widget integration for Google's reCAPTCHA service, protecting Django forms from automated bot submissions. It supports three reCAPTCHA versions: V2 Checkbox (user clicks a box), V2 Invisible (verification happens silently), and V3 (risk scoring based on user behavior). The package wraps Google's reCAPTCHA API and handles both client-side rendering and server-side validation, with configurable score thresholds for V3 and support for proxy settings and alternative domains.
You add it to a Django form by declaring a ReCaptchaField, configure your Google API keys in Django settings, and the widget renders the appropriate reCAPTCHA UI. It includes error translations for multiple languages and allows per-field key override and customization of widget appearance through data attributes and API parameters. The package has been maintained since 2010 and is actively developed.
Use it for:
- Protect user registration and login forms from automated account creation and credential stuffing attacks.
- Prevent spam submissions in contact forms, comment sections, and feedback forms on public websites.
- Use reCAPTCHA V3 scoring to flag suspicious form submissions for review without interrupting legitimate users.
- Implement invisible reCAPTCHA on checkout or payment forms to reduce friction while maintaining bot protection.
- Customize reCAPTCHA appearance (theme, size, language) to match your site's design and user base.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates Google reCAPTCHA (V2 Checkbox, V2 Invisible, and V3) into Django forms as a field and widget for bot detection and form protection.
Yes. Django reCAPTCHA is a mature, actively maintained package with low install friction, no known vulnerabilities, and permissive licensing. It is the standard way to integrate Google reCAPTCHA into Django forms and is suitable for any Django project needing bot protection. Install it if you need to protect forms from automated abuse.
Install
django-recaptcha on PyPI
pip
pip install django-recaptchauv
uv add django-recaptchapoetry
poetry add django-recaptchaInstalling django-recaptcha
Before you install
Low install friction with a single runtime dependency on django. Actively maintained with recent commits and a stable release history since 2010; tested against Python 3.9–3.13 and Django 4.2–5.2.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install django-recaptcha
# In settings.py
INSTALLED_APPS = [..., 'django_recaptcha', ...]
RECAPTCHA_PUBLIC_KEY = 'your_public_key'
RECAPTCHA_PRIVATE_KEY = 'your_private_key'
# In forms.py
from django_recaptcha.fields import ReCaptchaField
class MyForm(forms.Form):
captcha = ReCaptchaField()
Requires a Google reCAPTCHA account and API keys (public and private) obtained from Google's reCAPTCHA console.
Verify before relying
- Whether the included modified reCAPTCHA client (client.py) is kept in sync with upstream recaptcha-client library updates.
- Performance impact of reCAPTCHA V3 score validation on form submission latency.
- Exact list of supported language codes beyond the documented es, fr, nl, pl, pt_BR, ru, zh_CN, zh_TW.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | actively maintained — 504 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 654,128/month — #5,529 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_recaptcha-4.1.0-py3-none-any.whl
Keywords: django, reCAPTCHA, reCAPTCHA v2, reCAPTCHA v3
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
django-simple-captchaAdds CAPTCHA image challenges to Django forms…
permissive · top 15,000 on PyPI
drf-recaptchaAdds reCAPTCHA v2 and v3 field validation to…
permissive · top 15,000 on PyPI
anticaptchaofficialSolves CAPTCHAs and related challenges (image…
permissive · top 15,000 on PyPI
2captcha-pythonA Python client for the 2Captcha API that…
permissive · top 15,000 on PyPI
Flask-WTFFlask-WTF integrates WTForms with Flask to…
permissive · top 5,000 on PyPI
recognizerSolves reCAPTCHA challenges using AI-based…
permissive · top 15,000 on PyPI
capsolverCapsolver is a Python client library for…
permissive · top 15,000 on PyPI
django-select2Provides custom autocomplete form fields for…
permissive · top 15,000 on PyPI
django-autocomplete-lightProvides autocomplete widgets for Django forms…
permissive · top 15,000 on PyPI
django-aceIntegrates the ACE code editor into Django…
permissive · top 15,000 on PyPI