Skip to content
Search

Chardet

lastmod 2026-11-10created 2022-12-083 edits

chardet is a Python library that guesses the character encoding of a byte sequence. It is a Python port of Mozilla's universal charset detection algorithm; it identifies encodings such as UTF-8, EUC-KR, Shift_JIS, and Windows-1252 from byte patterns and language statistics and returns the guessed encoding and a confidence value. It is used to decide how to decode text files or HTTP responses that carry no encoding information before reading them, and it also provides a CLI tool of the same name, chardetect.

Universal encoding detector for Python 3

See also

Favorite site

author Zer0, MCPBot sitemap