# Install chardet with Homebrew, apt

Python character encoding detector. Version 7.4.3 via Homebrew; verified 2026-04-14.

## Install

```sh
sudo av install brew:chardet
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install chardet
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install python-chardet-doc
```

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

## Package facts

- **Package key:** brew:chardet
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/chardet>
- **Version:** 7.4.3
- **Source summary:** Python character encoding detector
- **Homepage:** <https://chardet.readthedocs.io/en/latest/>
- **Repository:** <https://github.com/chardet/chardet>
- **Upstream docs:** <https://chardet.readthedocs.io/en/latest>
- **License:** LGPL-2.1-or-later
- **Source archive:** <https://files.pythonhosted.org/packages/19/b6/9df434a8eeba2e6628c465a1dfa31034228ef79b26f76f46278f4ef7e49d/chardet-7.4.3.tar.gz>
- **Last updated:** 2026-04-14T23:36:27Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- chardetect (cli)
- chardetect (alias)

## Dependencies

- python@3.14

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 7.4.3
- Package-manager updated: 2026-04-14
- Local data: ok
- Upstream repository: https://chardet.readthedocs.io/en/latest/
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

chardet is Python's long-running universal character encoding detector, exposed as both a library and the `chardetect` command-line tool.

### Project history

The official README says Mark Pilgrim originally created chardet in 2006 as a Python port of Mozilla's universal charset detection library. After Pilgrim disappeared from the web in 2011, maintenance continued under later Python maintainers.

### Adoption history

chardet became a standard dependency in Python text-processing stacks because it solved the practical problem of guessing encodings for unknown byte streams. The supplied package facts show Homebrew packaging plus Debian and Ubuntu documentation packages, while the README documents normal installation with `pip install chardet`.

### How it is used

Users call `chardet.detect`, `detect_all`, or `UniversalDetector` from Python, or run `chardetect` on files or stdin to print a guessed encoding and confidence.

### Why package nerds care

chardet is package-nerd significant because it sits at the messy boundary between package metadata, HTTP downloads, archives, and text decoding. It is also notable for a 2026 chardet 7 rewrite that kept the package name and public API while changing implementation and license.

### Timeline

- 2006: Mark Pilgrim created chardet as a Python port of Mozilla's universal charset detector.
- 2008: chardet 1.0.1 released on PyPI according to the official README history.
- 2011: Project maintenance continued after Pilgrim deleted his online accounts.
- 2012: chardet/chardet public GitHub repository created.
- 2017: chardet 3.0.x releases published on GitHub.
- 2026: chardet 7.0 released as a ground-up 0BSD-licensed rewrite under the same package name.

### Related projects

- Mozilla's universal charset detection library is the upstream idea chardet originally ported.
- charset-normalizer is a related Python encoding detector compared directly in the chardet 7 README.

### Sources

- <https://github.com/chardet/chardet#readme>
- <https://chardet.readthedocs.io/en/latest>
- <https://www-archive.mozilla.org/projects/intl/chardet.html>
- <https://formulae.brew.sh/formula/chardet>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** chardet
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - python-chardet-doc - 5.2.0+dfsg-2: normalized package name match | Debian stable package indexes: python-chardet-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Universal Character Encoding Detector (Documentation) | https://github.com/chardet/chardet
- Debian apt - python3-chardet - 5.2.0+dfsg-2: normalized package name match | Debian stable package indexes: python3-chardet from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Universal Character Encoding Detector (Python3) | https://github.com/chardet/chardet
- Ubuntu apt - python-chardet-doc - 5.2.0+dfsg-1: normalized package name match | Ubuntu 24.04 LTS package indexes: python-chardet-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Universal Character Encoding Detector (Documentation) | https://github.com/chardet/chardet
- Ubuntu apt - python3-chardet - 5.2.0+dfsg-1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-chardet from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Universal Character Encoding Detector (Python3) | https://github.com/chardet/chardet


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [abi3audit](https://www.automicvault.com/pkg/brew/abi3audit/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [fades](https://www.automicvault.com/pkg/brew/fades/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [flake8](https://www.automicvault.com/pkg/brew/flake8/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [flit](https://www.automicvault.com/pkg/brew/flit/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [hatch](https://www.automicvault.com/pkg/brew/hatch/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [isort](https://www.automicvault.com/pkg/brew/isort/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [johnnydep](https://www.automicvault.com/pkg/brew/johnnydep/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [pdm](https://www.automicvault.com/pkg/brew/pdm/) - Shares av.db curated category or tags: cli, developer-tools, python.
- [libchardet](https://www.automicvault.com/pkg/brew/libchardet/) - Local package facts share a topical domain. Shared terms: chardet, charset, charset-detection, cli, detection.
- [pyp](https://www.automicvault.com/pkg/brew/pyp/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, processing, python.
- [codespell](https://www.automicvault.com/pkg/brew/codespell/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, processing, python.

## Combined YAML source

View the package source record on GitHub. [combined/chardet.yml](https://github.com/automic-vault/db/blob/main/combined/chardet.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
