chardet
Python library for detecting character encodings in text files.
- Status
- Generally available
- Last checked
- Checked · Oct 14, 2026
- License
- Open source
- Pricing
- Free tier · from $0
What it is
Chardet is a Python library that detects the encoding of bytes or byte-like objects. It's useful for processing text data from various sources where the encoding might be unknown or inconsistent, ensuring accurate decoding and manipulation of text content.
Chardet stands out for its ability to accurately detect character encodings from a wide range of sources, making it an essential tool for developers working with diverse and potentially inconsistent text datasets.
When it fits — and when it doesn’t
A good fit for
Developers working on projects that require handling text data from multiple sources with unknown or inconsistent encoding
Teams building applications that need to accurately decode and process text content without manual intervention
Look elsewhere if
Projects where the character encoding is already known and consistent, as chardet's detection capabilities are not necessary in such cases
Applications requiring real-time streaming of text data, as chardet operates on byte-like objects rather than streams
Known weaknesses
Each one links to the public issue, changelog or docs page it came from, where we have one.
- 01
Limited support for obscure encodings
Chardet may not accurately detect less common or proprietary character encodings, leading to potential decoding errors.
- 02
Performance overhead for large datasets
Analyzing the encoding of large files can be slow and resource-intensive, impacting real-time or high-throughput applications.
- 03
Dependency on heuristics may lead to inaccurate results
Chardet relies heavily on statistical analysis which might not always yield the correct encoding, especially with short text samples.
- 04
No built-in support for automatic decoding
While Chardet can detect encodings, it does not provide a straightforward way to decode the detected content, requiring additional manual steps or integration with other libraries.
What it does well
Detects character encodings in text files
Supports Python 2 and 3
LGPL-2.1 licensed, open-source
Pricing
- Free tier
- YesOpen source — free to use
- Paid from
- $0
- Model
- Flat rate
- Enterprise plan
- No
Pricing not independently confirmed — check the vendor’s page.
Performance benchmarks
How Fast Is It?
Set up chardet
Setup steps, common gotchas and what to check after 30 days.
Get the badge
A small badge for chardet’s README or site: its name, “Tracked on AI Navigator”, and the availability status and check month from this page. It updates as the catalog does.
Markdown
[](https://navigateaitools.com/explorer/tool/chardet)HTML
<a href="https://navigateaitools.com/explorer/tool/chardet"><img src="https://navigateaitools.com/badge/chardet.svg" alt="chardet — tracked on AI Navigator" height="58"></a>