domain2idna
The tool to convert a domain or a file with a list of domain to the famous IDNA format.
Decision gist · record as of 2026-08-14
Yes. The package solves a specific, well-defined problem (IDNA conversion) with low install friction, permissive licensing, active maintenance, no known vulnerabilities, and a straightforward API suitable for both CLI and programmatic use. Install it if you need to work with internationalized domain names.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6.2 or later (supports current Python versions up to <4).
- Low friction: pure Python wheel with minimal dependencies (setuptools, colorama).
- Active maintenance with recent commits; last release 202 days ago but repository shows ongoing activity.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive): you can use, modify, and distribute freely with minimal restrictions; include the license and copyright notice in distributions.
last release 2026-01-24 (202 days) · last repo commit 2026-07-20 · 5 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 110,783 downloads/mo, #12,445 on PyPI
Alternatives
Verify before relying
pip install domain2idna
from domain2idna import domain2idna
result = domain2idna.convert('münchen.de')
print(result) # Output: xn--mnchen-3ya.de- Whether the package handles edge cases in IDNA conversion (e.g., mixed scripts, invalid domains) as documented
- Performance characteristics when processing very large domain lists
- Whether commented-line filtering works as intended across different file encodings
What it is and what it does
domain2idna is a command-line and library tool that converts domain names and URLs from human-readable Unicode form into Punycode/IDNA format, the standardized ASCII-compatible encoding for internationalized domain names. It reads individual domains, full URLs, or entire files (skipping commented lines starting with #) and outputs the converted results either to the screen or to a file.
The package is designed for domain list and hosts file maintainers who need to normalize international domains for DNS systems or configuration files. It can be used as a standalone CLI tool or imported as a module to integrate domain conversion into other Python applications. With setuptools and colorama as its only runtime dependencies, it installs with low friction and has been actively maintained since 2018.
Use it for
- Convert a hosts file containing international domain names to IDNA format for DNS configuration
- Batch-process a blocklist of domains with non-ASCII characters before deploying to filtering systems
- Normalize user-supplied domain input in a web application before validation or storage
- Generate Punycode versions of international domains for compatibility with legacy DNS tools
- Maintain parallel lists of human-readable and IDNA-encoded domains for documentation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a specific, well-defined problem (IDNA conversion) with low install friction, permissive licensing, active maintenance, no known vulnerabilities, and a straightforward API suitable for both CLI and programmatic use. Install it if you need to work with internationalized domain names.
Install
domain2idna on PyPI
Before you install
Low friction: pure Python wheel with minimal dependencies (setuptools, colorama). Active maintenance with recent commits; last release 202 days ago but repository shows ongoing activity.
Requires Python 3.6.2 or later (supports current Python versions up to <4).
License in practice
MIT license (permissive): you can use, modify, and distribute freely with minimal restrictions; include the license and copyright notice in distributions.
Quickstart
pip install domain2idna
from domain2idna import domain2idna
result = domain2idna.convert('münchen.de')
print(result) # Output: xn--mnchen-3ya.de
Verify before relying
- Whether the package handles edge cases in IDNA conversion (e.g., mixed scripts, invalid domains) as documented
- Performance characteristics when processing very large domain lists
- Whether commented-line filtering works as intended across different file encodings
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <4,>=3.6.2 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagessetuptoolscolorama |
| Maintenance | Actively maintained 202 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 110,783 / month, #12,445 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Internet |
Evidence: domain2idna-1.12.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “domain to punycode converter”
- domain2idnaConverts domain names and URLs to Punycode/IDNA format, with support…
- idnaConverts domain names between Unicode and ASCII-compatible encoding…
- publicsuffixlistParses the Public Suffix List to extract the public and private…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also idna · idna_ssl · apeye-core · publicsuffixlist · urlpy · publicsuffix2 · PyFunceble-dev · dnstwist · py2opsin · dnspython