# Install libidn2 with Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, zypper

International domain name library (IDNA2008, Punycode and TR46). Version 2.3.8 via Homebrew; verified from local package data. Also installable with debian: sudo apt install idn2.

## Install

```sh
sudo av install brew:libidn2
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libidn2
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libidn2
```

  Evidence: MacPorts ports tree: mail/libidn2/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libidn2
```

  Evidence: Alpine Linux edge package indexes: libidn2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install libidn2
```

  Evidence: Fedora Rawhide package metadata: libidn2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libidn2
```

  Evidence: nixpkgs package indexes: libidn2 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S libidn2
```

  Evidence: Arch Linux sync databases: libidn2 from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install idn2
```

  Evidence: Debian stable package indexes: idn2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- zypper (92%):

```sh
sudo zypper install libidn2-0
```

  Evidence: openSUSE Tumbleweed package metadata: libidn2-0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## Package facts

- **Package key:** brew:libidn2
- **Package manager:** Homebrew
- **Version:** 2.3.8
- **Source summary:** International domain name library (IDNA2008, Punycode and TR46)
- **Homepage:** <https://www.gnu.org/software/libidn/#libidn2>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- idn2 (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 2.3.8
## Project history and usage

GNU Libidn2 is the GNU successor to Libidn for IDNA2008 and Unicode TR46 internationalized-domain-name processing.

### Project history

The IETF IDNA2008 RFC series replaced the earlier IDNA2003 model, describing a revised protocol and definitions for internationalized domain names. Libidn2 was created to implement that newer standards family while retaining package-level continuity for GNU users.

The Libidn2 NEWS file records an initial 0.0 alpha release on 2011-03-09 for public API review, with IDNA2008 lookup mostly implemented. Release 0.2 on 2011-03-30 added the idn2 command-line tool and made lookup/register functions operational.

Release 0.12 on 2016-12-26 added TR46/UTS #46 support to the API and idn2 utility. Release 2.0.0 on 2017-03-29 changed the version numbering scheme and added to-ASCII and to-Unicode conversion functions corresponding to Libidn functions. Release 2.0.5 on 2018-05-18 switched the default library behavior to IDNA2008 as amended by non-transitional TR46.

### Adoption history

The GNU Libidn page explicitly calls Libidn2 the successor of GNU Libidn and notes that it provides IDNA2008, TR46, and a compatibility layer for GNU Libidn. That made it the practical migration path for distributions and network applications moving away from IDNA2003 behavior.

Libidn2 is package-visible because applications often need a shared, audited implementation of Unicode domain-name conversion rather than hand-rolling security-sensitive Punycode and normalization behavior.

### How it is used

Users call idn2 for command-line conversion and debugging, while applications link the library for IDNA lookup and registration conversions. The manual emphasizes correct locale and UTF-8 handling because feeding bytes in the wrong character set can produce errors or wrong output.

### Why package nerds care

Libidn2 is where DNS, Unicode versioning, security-sensitive string handling, and compatibility policy meet. Packagers care about it because changing from libidn to libidn2 can alter IDNA behavior, but staying on IDNA2003 can be wrong for software that expects IDNA2008/TR46.

It is also a good example of a successor package that is not just a new ABI: it represents a standards transition and a different view of what domain names should accept.

### Timeline

- 2010: RFC 5890 and related RFCs documented the IDNA2008 revision that superseded IDNA2003.
- 2011: Libidn2 0.0 alpha released for public API review.
- 2011: Libidn2 0.2 added the idn2 command-line tool.
- 2016: Libidn2 0.12 added TR46/UTS #46 support.
- 2017: Libidn2 2.0.0 changed version numbering and added Libidn-corresponding conversion APIs.
- 2018: Libidn2 2.0.5 made IDNA2008 plus non-transitional TR46 the default behavior.

### Related projects

- GNU Libidn is the predecessor and compatibility target.
- GNU libunistring is related through Unicode string support used by Libidn2 builds.
- RFC 5890, RFC 5891, and Unicode UTS #46 define the standards context around Libidn2.

### Sources

- <https://datatracker.ietf.org/doc/html/rfc5890>
- <https://datatracker.ietf.org/doc/html/rfc5891>
- <https://github.com/libidn/libidn2/blob/master/NEWS>
- <https://unicode.org/reports/tr46/>
- <https://www.gnu.org/software/libidn/>
- <https://www.gnu.org/software/libidn/libidn2/manual/libidn2.html>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Other Package-Manager Records

- Debian apt - idn2 - 2.3.8-2: normalized package name match | Debian stable package indexes: idn2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Internationalized domain names (IDNA2008/TR46) command line tool | https://www.gnu.org/software/libidn/#libidn2
- Debian apt - libidn2-0 - 2.3.8-2: normalized package name match | Debian stable package indexes: libidn2-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Internationalized domain names (IDNA2008/TR46) library | https://www.gnu.org/software/libidn/#libidn2
- Debian apt - libidn2-dev - 2.3.8-2: normalized package name match | Debian stable package indexes: libidn2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Internationalized domain names (IDNA2008/TR46) development files | https://www.gnu.org/software/libidn/#libidn2
- Debian apt - libidn2-doc - 2.3.8-2: normalized package name match | Debian stable package indexes: libidn2-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Internationalized domain names (IDNA2008/TR46) documentation | https://www.gnu.org/software/libidn/#libidn2
- Nix - libidn2: normalized package name match | nixpkgs package indexes: libidn2 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - idn2 - 2.3.7-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: idn2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Internationalized domain names (IDNA2008/TR46) command line tool | https://www.gnu.org/software/libidn/#libidn2
- Ubuntu apt - libidn2-0 - 2.3.7-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libidn2-0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Internationalized domain names (IDNA2008/TR46) library | https://www.gnu.org/software/libidn/#libidn2
- Ubuntu apt - libidn2-dev - 2.3.7-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libidn2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Internationalized domain names (IDNA2008/TR46) development files | https://www.gnu.org/software/libidn/#libidn2
- Ubuntu apt - libidn2-doc - 2.3.7-2build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libidn2-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Internationalized domain names (IDNA2008/TR46) documentation | https://www.gnu.org/software/libidn/#libidn2
- apk - idn2-utils - 2.3.8-r0: normalized package name match | Alpine Linux edge package indexes: idn2-utils from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Encode/Decode library for internationalized domain names (CLI utilities) | https://www.gnu.org/software/libidn#libidn2
- apk - libidn2 - 2.3.8-r0: normalized package name match | Alpine Linux edge package indexes: libidn2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Encode/Decode library for internationalized domain names | https://www.gnu.org/software/libidn#libidn2
- apk - libidn2-dev - 2.3.8-r0: normalized package name match | Alpine Linux edge package indexes: libidn2-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Encode/Decode library for internationalized domain names (development files) | https://www.gnu.org/software/libidn#libidn2
- apk - libidn2-doc - 2.3.8-r0: normalized package name match | Alpine Linux edge package indexes: libidn2-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Encode/Decode library for internationalized domain names (documentation) | https://www.gnu.org/software/libidn#libidn2
- apk - libidn2-static - 2.3.8-r0: normalized package name match | Alpine Linux edge package indexes: libidn2-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Encode/Decode library for internationalized domain names (static library) | https://www.gnu.org/software/libidn#libidn2
- dnf - idn2 - 2.3.8-4.fc45: normalized package name match | Fedora Rawhide package metadata: idn2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | IDNA2008 internationalized domain names conversion tool | https://www.gnu.org/software/libidn/#libidn2
- dnf - libidn2 - 2.3.8-4.fc45: normalized package name match | Fedora Rawhide package metadata: libidn2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Library to support IDNA2008 internationalized domain names | https://www.gnu.org/software/libidn/#libidn2


## Combined YAML source

View the package source record on GitHub. [combined/libidn2.yml](https://github.com/mxcl/pkgdb/blob/main/combined/libidn2.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
