skillfed

idna

Internationalized Domain Names in Applications (IDNA)

idna Permissive license BSD-3-Clause Active 289 v3.18 released

Install

idna on PyPI

pip

pip install idna

uv

uv add idna

poetry

poetry add idna

Package 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsOperating 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 :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: Name Service (DNS)Topic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

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

Read as markdown · JSON record · Source repository

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.

internationalized domain namespunycode encoding decodingunicode domain conversionidna domain processingascii compatible encodingdomain name normalizationunicode to ascii domain

Similar packages