idna
Internationalized Domain Names in Applications (IDNA)
Install
idna on PyPI
pip
pip install idnauv
uv add idnapoetry
poetry add idnaPackage facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 72 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the 100 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: idna-3.18-py3-none-any.whl
About idna
from the package's own PyPI description — quoted content, verbatim
Internationalized Domain Names in Applications (IDNA)
Support for Internationalized Domain Names in Applications
(IDNA) and Unicode IDNA
Compatibility Processing. It
supersedes the standard library's encodings.idna, which only
implements the 2003 specification, offering broader script coverage and
limiting domains with known security vulnerabilities.
Usage
Package may be installed from PyPI via
the typical methods (e.g. python3 -m pip install idna)
For typical usage, the encode and decode functions will take a
domain name argument and perform a conversion to ASCII-compatible encoding
(known as A-labels), or to Unicode strings (known as U-labels)
respectively.
>>> import idna
>>> idna.encode('ドメイン.テスト')
b'xn--eckwd4c7c.xn--zckzah'
>>> print(idna.decode('xn--eckwd4c7c.xn--zckzah'))
ドメイン.テスト
Conversions can be applied at a per-label basis using the ulabel or
alabel functions for specialized use cases.
Compatibility Mapping (UTS #46)
This library provides support for [Unicode IDNA...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
idna converts domain names between Unicode and ASCII-compatible encoding (punycode) formats, implementing the IDNA 2008 standard and Unicode Compatibility Processing to handle internationalized domain names securely.
Minimal install friction: pure Python wheel with zero runtime dependencies, active maintenance (release 72 days ago), and stable production status across Python 3.9–3.14.
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only retention of license and copyright notices.
Usage
pip install idna
import idna
print(idna.encode('ドメイン.テスト')) # b'xn--eckwd4c7c.xn--zckzah'
print(idna.decode('xn--eckwd4c7c.xn--zckzah')) # ドメイン.テスト
Requires Python 3.9 or higher.
Verdict: idna is a mature, actively maintained standard library for IDNA domain conversion with zero dependencies, permissive licensing, and no known vulnerabilities. It is suitable for production use in any application requiring internationalized domain name handling.
Similar packages
permissive · top 1,000 on PyPI
giturlparsepermissive · top 1,000 on PyPI
email-validatorpermissive · top 1,000 on PyPI
dnspythonpermissive · top 1,000 on PyPI
url-normalizepermissive · top 1,000 on PyPI
ujsonpermissive · top 1,000 on PyPI
httpxpermissive · top 100 on PyPI
fqdncopyleft · top 1,000 on PyPI
wcwidthpermissive · top 1,000 on PyPI
emojipermissive · top 1,000 on PyPI