skillfed

django-phonenumber-field

An international phone number field for django models.

django-phonenumber-field v8.5.0 6.6M downloads/30d#1,887 on PyPI1,551
Permissive license MIT Active released

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-field

uv

uv add django-phonenumber-field

poetry

poetry add django-phonenumber-field

Installing 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

Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Internet :: WWW/HTTP

Tags

django phone number fieldinternational phone validationphone number formatting djangolibphonenumber django integrationvalidate phone numbers django model
django-integrationphone-validationinternationalization

More WWW/HTTP packages