Skip to main content

charset-norm

PyPI - Version Crates.io Version CI PyPI Downloads

A Rust rewrite of charset_normalizer, the universal charset detector for Python.

The detection core (codecs, Unicode tables, mess and coherence analysis) is the charset-norm Rust crate, usable on its own; the charset_norm Python package wraps it through PyO3 and keeps the original charset_normalizer API.

Path What
crates/charset-norm Rust library (publishable to crates.io)
crates/charset-norm-python PyO3 bindings built as charset_norm._native
src/charset_norm Python package

Installation

Requires Python 3.9+ and, when building from source, Rust 1.98+.

pip install charset-norm

# or using uv
uv add charset-norm

Prebuilt wheels cover Linux (x86_64, arm64), Windows and macOS (arm64) for CPython 3.9+ (abi3), free-threaded CPython 3.14 and PyPy 3.11/3.12. Other platforms build from the source distribution. To install the latest code:

pip install git+https://github.com/RustedBytes/charset-norm.git

Usage

from charset_norm import from_bytes, from_path

best = from_path("./my_subtitle.srt").best()
print(best.encoding, str(best))

payload = "Всеки човек има право на образование.".encode("cp1251")
print(from_bytes(payload).best().encoding)  # cp1251

A chardet-compatible detect() is also available:

from charset_norm import detect

Command line:

normalizer ./data/sample-french.txt

Rust

[dependencies]
charset-norm = "4.0"
let results = charset_norm::from_bytes(&payload);
if let Some(best) = results.best() {
    println!("{} {}", best.encoding(), best.decoded()?);
}

See the crate README for more.

Development

pip install maturin
maturin develop --release
pip install --group dev
pytest
cargo test --workspace --all-features

License

MIT. Based on charset_normalizer by Ahmed TAHRI (@Ousret).

Metadata

Release files for charset-norm 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for charset-norm 4.0.0
File Size Uploaded
charset_norm-4.0.0.tar.gz 747.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for charset-norm 4.0.0
File
charset_norm-4.0.0-pp312-pypy312_pp80-win_amd64.whl PyPy 3.12 PyPy 3.12 8.0 Windows x86-64 Details
charset_norm-4.0.0-pp312-pypy312_pp80-manylinux_2_28_x86_64.whl PyPy 3.12 PyPy 3.12 8.0 Linux glibc 2.28+ x86-64 Details
charset_norm-4.0.0-pp312-pypy312_pp80-manylinux_2_28_aarch64.whl PyPy 3.12 PyPy 3.12 8.0 Linux glibc 2.28+ ARM64 Details
charset_norm-4.0.0-pp312-pypy312_pp80-macosx_11_0_arm64.whl PyPy 3.12 PyPy 3.12 8.0 macOS 11.0+ ARM64 Details
charset_norm-4.0.0-pp311-pypy311_pp80-win_amd64.whl PyPy 3.11 PyPy 3.11 8.0 Windows x86-64 Details
charset_norm-4.0.0-pp311-pypy311_pp80-manylinux_2_28_x86_64.whl PyPy 3.11 PyPy 3.11 8.0 Linux glibc 2.28+ x86-64 Details
charset_norm-4.0.0-pp311-pypy311_pp80-manylinux_2_28_aarch64.whl PyPy 3.11 PyPy 3.11 8.0 Linux glibc 2.28+ ARM64 Details
charset_norm-4.0.0-pp311-pypy311_pp80-macosx_11_0_arm64.whl PyPy 3.11 PyPy 3.11 8.0 macOS 11.0+ ARM64 Details
charset_norm-4.0.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
charset_norm-4.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details
charset_norm-4.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64 Details
charset_norm-4.0.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
charset_norm-4.0.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
charset_norm-4.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
charset_norm-4.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
charset_norm-4.0.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details

Total release size: 33.0 MB

Release files / charset_norm-4.0.0.tar.gz

Download URL charset_norm-4.0.0.tar.gz
Size 747.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9068d19065eb16dced307b019e6ea8f29299470719619c1cdcf87f6b78e77b40
BLAKE2b-256 checksum
How to use checksums
ca59ce53bad344f2f7ebc6329f4b0822fd73636527f183c651157181cdc03578
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp312-pypy312_pp80-win_amd64.whl

Download URL charset_norm-4.0.0-pp312-pypy312_pp80-win_amd64.whl
Size 2.0 MB
Tags PyPy 3.12 PyPy 3.12 8.0 Windows x86-64
SHA-256 checksum
How to use checksums
9222270a99049f945963a8d23788c5c7016733e1acc114d85588c8fc7e7e7d3c
BLAKE2b-256 checksum
How to use checksums
6d19eb66aadf154207b6d900704814a0661474cb4427d4845b397465f730069f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp312-pypy312_pp80-manylinux_2_28_x86_64.whl

Download URL charset_norm-4.0.0-pp312-pypy312_pp80-manylinux_2_28_x86_64.whl
Size 2.1 MB
Tags Linux glibc 2.28+ x86-64 PyPy 3.12 PyPy 3.12 8.0
SHA-256 checksum
How to use checksums
87ad2be2a1adbd3b227cd975df219712964deb6737378b664309b3ae9bac4fac
BLAKE2b-256 checksum
How to use checksums
ad15f30de8c4937e538f0cf80bbdcacc7bfe8192f1599de16e16733dba65e9c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp312-pypy312_pp80-manylinux_2_28_aarch64.whl

Download URL charset_norm-4.0.0-pp312-pypy312_pp80-manylinux_2_28_aarch64.whl
Size 2.0 MB
Tags Linux glibc 2.28+ ARM64 PyPy 3.12 PyPy 3.12 8.0
SHA-256 checksum
How to use checksums
7d8aafdcfb5bf48918e1cded50d2a0c1b22f666a5d3af0180c203d9545a026e1
BLAKE2b-256 checksum
How to use checksums
3d512613c81e897550fc56c3d4c66cf96c1cc499c9ffcb6e6c64f16c0d4297a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp312-pypy312_pp80-macosx_11_0_arm64.whl

Download URL charset_norm-4.0.0-pp312-pypy312_pp80-macosx_11_0_arm64.whl
Size 2.0 MB
Tags PyPy 3.12 PyPy 3.12 8.0 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
9861f24da9b83364c914ee8c32cd31a0cc4989d971bb9ed2cd320aba381e2228
BLAKE2b-256 checksum
How to use checksums
3be85155d1ed43749825ca3a5c90e1e9030f44e84acc575d4d4af24e5da48c3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp311-pypy311_pp80-win_amd64.whl

Download URL charset_norm-4.0.0-pp311-pypy311_pp80-win_amd64.whl
Size 2.0 MB
Tags PyPy 3.11 PyPy 3.11 8.0 Windows x86-64
SHA-256 checksum
How to use checksums
d27d072c801f7c9e08cb2cb650becf21b2fb1cf0003668b6dda052e5a81818ce
BLAKE2b-256 checksum
How to use checksums
d46f0cfe008d703d2c1b43e896e09bc7dc28f6f320be1056c3ab32d5d94a5a6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp311-pypy311_pp80-manylinux_2_28_x86_64.whl

Download URL charset_norm-4.0.0-pp311-pypy311_pp80-manylinux_2_28_x86_64.whl
Size 2.1 MB
Tags Linux glibc 2.28+ x86-64 PyPy 3.11 PyPy 3.11 8.0
SHA-256 checksum
How to use checksums
93731c3d5b26a2b0b87a8739c4f4402bd1430feae4540c84c538a7ee27c2b41d
BLAKE2b-256 checksum
How to use checksums
c320e28ceb95f7c899bb46cd62e1e42732d96d5455d91ae737e5beb340269156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp311-pypy311_pp80-manylinux_2_28_aarch64.whl

Download URL charset_norm-4.0.0-pp311-pypy311_pp80-manylinux_2_28_aarch64.whl
Size 2.0 MB
Tags Linux glibc 2.28+ ARM64 PyPy 3.11 PyPy 3.11 8.0
SHA-256 checksum
How to use checksums
2c3f3ff53c8f4b962e6c217d0bd91acd3970ef7d5415925a6269f490d4da6e51
BLAKE2b-256 checksum
How to use checksums
b7ae31cbcee1ca6662b73f60ecb3735b271f3bc6f3228d187861feff8cefc325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-pp311-pypy311_pp80-macosx_11_0_arm64.whl

Download URL charset_norm-4.0.0-pp311-pypy311_pp80-macosx_11_0_arm64.whl
Size 2.0 MB
Tags PyPy 3.11 PyPy 3.11 8.0 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7b1918c20cf414e29811a19f7e4f717c18adbed6c5a87c29be57cad03f683f96
BLAKE2b-256 checksum
How to use checksums
c959f4b8b692bd8cdd084db08f76390208ca4633fe3fd1e464f92c05890e50be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp314-cp314t-win_amd64.whl

Download URL charset_norm-4.0.0-cp314-cp314t-win_amd64.whl
Size 2.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
09580cf77b416e13c9d27b55735f663f3f078b44f22001c1df0fcf33205c88ac
BLAKE2b-256 checksum
How to use checksums
6107b8cfb2888a99dbb6e434a86e43b6e42849664b7d5221be56430bd3ec70e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL charset_norm-4.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 2.1 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6e078519d916786029989a2d3f40421fc3d28a8daf97d7792e3223a6d9e9707d
BLAKE2b-256 checksum
How to use checksums
e56c38a21f664d8c69e486a7a5e6e541d5d94d3e57872e23e7b73c32c336e140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl

Download URL charset_norm-4.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl
Size 2.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
346f11ed96fd397a8021ffdeb681c5230508923162e5730764ba81a85d36c57a
BLAKE2b-256 checksum
How to use checksums
7d7ef124958d04e56d452fea52d0b1500dd2c32eb9b7785b05cf86a1ebed3f43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL charset_norm-4.0.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bab3dca92ad9b651251c4de5d0a340d82b8128314b4f114ed917139e86e8de7b
BLAKE2b-256 checksum
How to use checksums
87ed77ced49b26230abd5ae2248301c32bf3c2dff41ba51512fa2c068a1c6317
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp39-abi3-win_amd64.whl

Download URL charset_norm-4.0.0-cp39-abi3-win_amd64.whl
Size 2.0 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f5b966efd82b18f3800e59023a5100fa08661c95b767d2137b05898ce46efaee
BLAKE2b-256 checksum
How to use checksums
572e398cd2a531288fa7b61aa4cf1dff26f77ac3851d56eb74ada6ab9bd22fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL charset_norm-4.0.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d369a630e32e1ecee1b7926f2ff786b0f5e084fc748d6022cafce8c2dee6ece9
BLAKE2b-256 checksum
How to use checksums
9c56a718ed02430604ea821f062b998418a3cd2ba2a0da20f8a765961024df1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL charset_norm-4.0.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.0 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
35c973568aaae01085ce652196d3983b65900eb8ea424c155d2b47c6a6312539
BLAKE2b-256 checksum
How to use checksums
acdc103484e29d8d71406fb9cd8a9b86d00f9ca88d5b02b988e7d000ccac248c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / charset_norm-4.0.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL charset_norm-4.0.0-cp39-abi3-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fc2dff2608e13b83169aeaf4cf514df5ed438fa8a5a17e3c12723841fa4b9e45
BLAKE2b-256 checksum
How to use checksums
11cf112fba3e7901e032458d1540e70ba6862a609937813abc758c7331e40064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.0.0 This release

17 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page