chardet
A Python library and command-line tool for detecting the character encoding of text.
By chardet contributors
Read the chardet documentation
Alternatives
About chardet
chardet identifies likely text encodings from byte data and provides confidence results. Its current API supports detection of whole buffers, streaming input and filtering candidate encodings; the chardetect command works with files and standard input.
The current chardet 7 codebase is a rewrite under 0BSD, while earlier versions used LGPL. Detection is an estimate rather than a guarantee, so ambiguous text still needs checking. This is a developer dependency and CLI rather than a desktop editor or decompiler.
Strengths
- Python API plus the chardetect command
- Streaming detection and encoding filters
- Current rewrite has no runtime dependencies
Limitations
- Encoding guesses can be ambiguous
- Current branch requires Python 3.10 or later
- Older releases have different licensing
Details
- Pricing
- FreeFree and open source under 0BSD.
- License
- 0BSD
- Developer
- chardet contributors
- Platforms
- Command line
- How it runs
- Downloadable app
- Best suited for
- A Python library and command-line tool for detecting the character encoding of text.
- Categories
- CLI tools, Developer tools
- Last verified
- Added
- Sources