# Install nkf with Homebrew, apt, dnf, MacPorts, Nix, zypper

Network Kanji code conversion Filter (NKF). Version 2.1.5 via Homebrew; verified from local package data. Also installable with debian: sudo apt install libnkf-perl.

## Install

```sh
sudo av install brew:nkf
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install nkf
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nkf
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install nkf
```

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

- dnf (92%):

```sh
sudo dnf install nkf
```

  Evidence: Fedora Rawhide package metadata: nkf 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#nkf
```

  Evidence: nixpkgs package indexes: pkgs/by-name/nk/nkf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install nkf
```

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

## Package facts

- **Package key:** brew:nkf
- **Package manager:** Homebrew
- **Version:** 2.1.5
- **Source summary:** Network Kanji code conversion Filter (NKF)
- **Homepage:** <https://github.com/nurse/nkf>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- nkf (alias)

## Install behavior

- Bottle: not available

## Freshness

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

nkf, the Network Kanji Filter, is a long-lived Japanese text encoding conversion utility. It converts among encodings such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16, and UTF-32, with automatic input-encoding guessing as one of its defining conveniences.

### Project history

The upstream README credits the original 1987 Fujitsu work by Itaru Ichikawa and the nkf Project's later maintenance from 1996 through 2012. The project's change log shows a major 2.0-era transition in September 2002, including UTF-8/UTF-16 work and migration into SourceForge CVS, which matches nkf's role as Japanese Unix text processing moved from legacy encodings toward Unicode.

### Adoption history

nkf has survived because the Japanese encoding problem never fully disappeared: archives, mail, old web content, Windows-31J/CP932 data, and legacy build/test fixtures still need reliable conversion. Homebrew's API reported 144 installs in 30 days, 560 in 90 days, and 4,692 in 365 days when checked on July 1, 2026, and the package is also present across Debian/Ubuntu, Fedora, openSUSE, Nix, MacPorts, and other package systems.

### How it is used

Typical command-line use is plumbing: guess an unknown Japanese file's encoding, convert Shift_JIS or EUC-JP to UTF-8, normalize line endings, MIME-decode Japanese mail headers, or do in-place conversion with `--overwrite`. Developers also encounter nkf indirectly through language bindings, notably Ruby's NKF extension.

### Timeline

- 1987: original nkf copyright is attributed to Fujitsu Ltd. and Itaru Ichikawa.
- 1996-2012: README credits ongoing nkf Project copyright.
- 2002-09: 2.0-era notes record UTF support work and SourceForge CVS setup.
- 2018-12-15: v2.1.5 is the stable version carried by Homebrew.

### Related projects

- Ruby NKF extension
- python-nkf
- iconv

### Sources

- <https://formulae.brew.sh/api/formula/nkf.json>
- <https://github.com/nurse/nkf>
- <https://raw.githubusercontent.com/nurse/nkf/master/Changes>
- <https://raw.githubusercontent.com/nurse/nkf/master/nkf.1>
- <https://ruby-doc.org/core-3.1.2/NKF.html>


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Other Package-Manager Records

- Debian apt - libnkf-perl - 1:2.1.5-1+b8: normalized package name match | Debian stable package indexes: libnkf-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Network Kanji code conversion Filter for Perl | https://osdn.net/projects/nkf/
- Debian apt - nkf - 1:2.1.5-1+b8: normalized package name match | Debian stable package indexes: nkf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Network Kanji code conversion Filter | https://osdn.net/projects/nkf/
- Nix - nkf: normalized package name match | nixpkgs package indexes: pkgs/by-name/nk/nkf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libnkf-perl - 1:2.1.5-1build7: normalized package name match | Ubuntu 24.04 LTS package indexes: libnkf-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Kanji code conversion Filter for Perl | https://osdn.net/projects/nkf/
- Ubuntu apt - nkf - 1:2.1.5-1build7: normalized package name match | Ubuntu 24.04 LTS package indexes: nkf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Kanji code conversion Filter | https://osdn.net/projects/nkf/
- dnf - nkf - 2.1.4-40.fc45: normalized package name match | Fedora Rawhide package metadata: nkf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A Kanji code conversion filter | http://nkf.osdn.jp/
- dnf - perl-NKF - 2.1.4-40.fc45: normalized package name match | Fedora Rawhide package metadata: perl-NKF from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Perl extension for Network Kanji Filter | http://nkf.osdn.jp/
- zypper - nkf - 2.1.5-1.37: normalized package name match | openSUSE Tumbleweed package metadata: nkf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Network Kanji Code Conversion Filter | http://sourceforge.jp/projects/nkf/
- zypper - perl-NKF - 2.1.5-1.37: normalized package name match | openSUSE Tumbleweed package metadata: perl-NKF from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Perl extension for nkf (Network Kanji Filter) | http://sourceforge.jp/projects/nkf/
- MacPorts - nkf: normalized package name match | MacPorts ports tree: textproc/nkf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/nkf.yml](https://github.com/mxcl/pkgdb/blob/main/combined/nkf.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
