--- id: domain2idna version: "1.12.4" license: MIT https://raw.githubusercontent.com/PyFunceble/domain2idna/master/LICENSE license_treatment: permissive maintenance: active --- # domain2idna — The tool to convert a domain or a file with a list of domain to the famous IDNA format. License: permissive · Maintenance: active · Downloads: 110.8K/mo ## 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 above — verify before relying. Converts domain names and URLs to Punycode/IDNA format, with support for batch processing files and command-line or programmatic use. 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 pip install domain2idna uv add domain2idna poetry add domain2idna ## Installing domain2idna 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. 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 Requires Python 3.6.2 or later (supports current Python versions up to <4). 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: MIT https://raw.githubusercontent.com/PyFunceble/domain2idna/master/LICENSE (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 110.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags domain to punycode converter, idna format conversion, batch domain encoding, internationalized domain names, domain name normalization, punycode batch processing, url domain conversion, domain-encoding, cli-tool, internationalization [View on SkillFed](https://skillfed.io/packages/domain2idna) · [View on PyPI](https://pypi.org/project/domain2idna/)