django-phonenumber-field
An international phone number field for django models.
What it is and what it does
django-phonenumber-field is a Django model field that wraps Google's libphonenumber library to handle international phone numbers. It validates phone numbers according to international standards, formats them for display, and stores them in a standardized way within Django models. The field integrates seamlessly with Django's ORM and admin interface, allowing developers to treat phone numbers as a first-class data type rather than plain text strings.
The package is built on top of python-phonenumbers, which is a port of the same libphonenumber library that powers Android's phone handling. This means it inherits battle-tested validation logic from Google's implementation. It's useful in any Django application that needs to accept, store, or display phone numbers from users around the world, ensuring data consistency and correctness across different international formats.
Use it for:
- Store validated international phone numbers in Django models for user profiles or contact records.
- Validate phone numbers during form submission to catch invalid formats before saving to the database.
- Format phone numbers for display in templates using the field's built-in pretty-printing capabilities.
- Build multi-country applications where phone number formats vary by region and need standardized handling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Django model field for storing, validating, and formatting international phone numbers using Google's libphonenumber library.
Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and solves a concrete problem for Django applications handling international phone numbers. Its single dependency on Django and low install friction make it a straightforward addition to any Django project that needs reliable phone number handling.
Install
django-phonenumber-field on PyPI
pip
pip install django-phonenumber-fielduv
uv add django-phonenumber-fieldpoetry
poetry add django-phonenumber-fieldInstalling django-phonenumber-field
Before you install
Low friction installation with a single runtime dependency (Django). Active maintenance with a recent release 22 days ago and ongoing commits; supports current Python versions from 3.10 through 3.14.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install django-phonenumber-field
from django_phonenumber_field.modelfields import PhoneNumberField
class Contact(models.Model):
phone = PhoneNumberField()
Requires Django and Python 3.10 or later; the underlying phonenumber validation depends on python-phonenumbers.
Verify before relying
- Whether the package handles all international phone number formats or has known limitations with specific regions.
- Whether it provides form field widgets or only model field support.
- Performance characteristics when validating large batches of phone numbers.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — Django |
| Maintenance | actively maintained — 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,563,551/month — #1,887 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_phonenumber_field-8.5.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
phonenumbersParse, validate, format, and analyze…
permissive · top 1,000 on PyPI
phonenumbersliteParses, validates, formats, and analyzes…
permissive · top 5,000 on PyPI
django-phonenumbersProvides a Django model field and form field…
permissive · top 15,000 on PyPI
django-localflavorProvides country-specific form fields,…
permissive · top 5,000 on PyPI
phone-iso3166Maps international phone numbers and mobile…
permissive · top 15,000 on PyPI
django-countriesProvides a Django model field for storing…
permissive · top 5,000 on PyPI
azure-communication-phonenumbersManages Azure Communication Services phone…
permissive · top 15,000 on PyPI
django-dirtyfieldsTracks which fields on a Django model instance…
permissive · top 15,000 on PyPI
vonage-numbersProvides Python bindings to Vonage's Numbers…
permissive · top 15,000 on PyPI
brazilnumValidates and formats Brazilian identification…
permissive · top 15,000 on PyPI