# chardet/chardet

Python character encoding detector

Repository: https://github.com/chardet/chardet
Canonical: https://ross.abutalabs.com/products/chardet
Language: Python
License: 0BSD
License Family: permissive
Last push: 2026-08-23T23:21:51+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 100
- inputs: {"age_days": 5151, "days_push": 10, "days_rel": 19, "gap_med": 5, "n_releases_24m": 14}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2661, forks 306 (observed 2026-08-28T04:07:08.671655+00:00)

## What it is
chardet is a Python library that detects the character encoding of byte data, with language and MIME type detection included. Version 7 is a fast, 0BSD-licensed rewrite that is a drop-in replacement for earlier chardet releases with zero runtime dependencies.

## Use cases
- detect the encoding of a text file before decoding it
- identify character sets in scraped web content
- normalize mixed-encoding data during ETL pipelines
- detect language of text alongside its encoding
- identify MIME type of binary files
- stream-detect encoding of large files without loading them fully

## When to choose
- you need high-accuracy encoding detection in Python
- you want a permissive 0BSD license instead of LGPL
- you need fast detection on large inputs or streaming data
- you want language detection bundled with encoding detection

## When to avoid
- you only handle UTF-8 input and can skip detection entirely
- you need detection outside Python
- you prefer charset-normalizer's API ecosystem

## Facets
- artifact type: library
- maturity: active
- function: parser, nlp, developer-tools
- domain: developer-tools, files
- platform: python, cross-platform
- tags: character-encoding, charset-detection, unicode, text-processing, drop-in-replacement, natural-language-processing

## Member repositories
- chardet/chardet (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:08.671655+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:18:22.558954+00:00, confidence not recorded.
  - readme: https://github.com/chardet/chardet (fetched 2026-08-28T04:07:08.671655+00:00, sha c57d5bee6e95)
  - registry_pypi: https://pypi.org/pypi/chardet/json (fetched 2026-08-29T10:01:07.760329+00:00, sha 49e7fa9a1ba1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
