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.1"
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.1.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.1.0
File Size Uploaded
charset_norm-4.1.0.tar.gz 753.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for charset-norm 4.1.0
File
charset_norm-4.1.0-pp312-pypy312_pp80-win_amd64.whl PyPy 3.12 PyPy 3.12 8.0 Windows x86-64 Details
charset_norm-4.1.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.1.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.1.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.1.0-pp311-pypy311_pp80-win_amd64.whl PyPy 3.11 PyPy 3.11 8.0 Windows x86-64 Details
charset_norm-4.1.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.1.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.1.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.1.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
charset_norm-4.1.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.1.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.1.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
charset_norm-4.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
charset_norm-4.1.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.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
charset_norm-4.1.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.1.0.tar.gz

Download URL charset_norm-4.1.0.tar.gz
Size 753.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4ef161ff9b7d75ba3c128f975da0b24ce90f72d70f6c9c02cd75cf8b8568111f
BLAKE2b-256 checksum
How to use checksums
02f31e03155570180347434c7f221c7ed58514a798e4ed0646705ab8e7939073
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
a9475e38bac2c414e1a163df761f241366fa781cc80da32bbf79365bcdd41fd8
BLAKE2b-256 checksum
How to use checksums
a3be137e46b9cae403eae97b2f98b1c13d705e4debcc866d248d09a9a43c70ac
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
459ac9d62257e9bef1871d70d7002e006b853db5783f88b309e001eb7c3bf681
BLAKE2b-256 checksum
How to use checksums
4cd5bbcd3cda68d0299695cf9fb46e02bfeacaab3c6be2388e914d64926d0239
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
9f4a4cc13292a8d33172a95d844ce9edba89c137e79aec95db6cffb2e8f2f2b3
BLAKE2b-256 checksum
How to use checksums
95e3fda11cf4d660f5c3d6f284b15f91b30112dbe9adeb3c7fe3167dff56c0bc
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
a8af6e9ab8c19a54a0250be81f6d6df7659e87866d5d98d6aac8fb3248b84aa2
BLAKE2b-256 checksum
How to use checksums
cc96308a839b31177ba4fcb731449971db4eefcc1f8bda232351a6ff1e343c4f
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
cec1be51bef2b2c9533e80e2f793103747ec1eb39c1e5d9b456290501d62e6c9
BLAKE2b-256 checksum
How to use checksums
c524c9f6888e35b12fefcd7293f05d9f360f333461f0d36de74dd4c0ee66f19d
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
58bf9b5a932d3f1e45a75c8104499f3874693b1b7e385bcb01394d7aba74fc0b
BLAKE2b-256 checksum
How to use checksums
d87d4985837b74c6618514c1d0652acb243e9626ce9bc0cca734925972595dcd
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
9bf3718a4baaca1d94e050bc8a713675e14163b53ec3c6f194254cfc950d9f28
BLAKE2b-256 checksum
How to use checksums
bb81a0042651ad83cc1313d25c430409b36cc8582891222ae5212d5bfe5b75ce
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
e8f4dabb315d3342d5073e45ae7c18884537b0cee8e577ea977e967847b782f7
BLAKE2b-256 checksum
How to use checksums
dda4bebbc39ec7fc78791f470d0e5b33737089effef1bd39352a47226a3e8523
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
d0daa6e7fde3680869da9b80209f0f7378bab369316821ab83db9ba4cc9336fa
BLAKE2b-256 checksum
How to use checksums
f906d5ef7d3e63e9b0a4c308070b3f711bb654b6373b650df05f29cf007e9c76
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
dcb32414e529ab855c6058adc229fa44a75fe69b801b49c187a9caae71a74abf
BLAKE2b-256 checksum
How to use checksums
f4e69e067d682934ebb230d38d5b20a34ed9ba0f02cb0c649a659bc3095eb0fd
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
8fc0f30dc5894a401df27b25ec0ca129dba248f89c7959f0d430c3d4052c0b05
BLAKE2b-256 checksum
How to use checksums
24501ea613ad0064c6f3bfba5f20f832a55ccaf95ca3a5eea19d416b61521c37
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
78c6c9362d81713da38fe74032fc232fc0cb927a8d7d2dd61045121cea8cc0b4
BLAKE2b-256 checksum
How to use checksums
5e42050dc9524b750555e4aa2d97a2d4a7c16558705d8d0f49a927b672b774a2
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
80cd2d4a73219b1b69745423b27a3a4741740d965dfb26d32fdb392fe9483cec
BLAKE2b-256 checksum
How to use checksums
f0995e8f829c0e2b3c547a0a8ab5d23b3f791eaeb5a5b9b739610bd7223c5362
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
c6d2cc85c4b24daddd652942ef9e40a620bca583e47dfc081f318612ea92c8e4
BLAKE2b-256 checksum
How to use checksums
ba8a622d3bf26964d5b0a1154af9fbf2e0062a2b9965eff4525b9d96d81b66ec
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
0a2bda5766cf52205a405b7a412f1c926a15505be03bc855f50adfef127ce701
BLAKE2b-256 checksum
How to use checksums
852f998e0da5cea9bae1cf1d32e014ea4c651604bd85b45458cc19e8b93c4249
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 Oct 5, 2026.

Transparency log

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

Download URL charset_norm-4.1.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
e40ec4c13e29e595ec17c1e7f7d9d0b0f8855c84cc5a7add16237e0953df6ce6
BLAKE2b-256 checksum
How to use checksums
3c2ace0fcf05ca351c8fbdcbfbf14491505b1fefa2e53f3bd0b2184b8f6afd47
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 Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.1.0 This release

17 release files

4.0.0

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