mbstrdecoder
mbstrdecoder is a Python library for multi-byte character string decoder
What it is and what it does
mbstrdecoder is a lightweight Python library that takes multi-byte encoded byte strings and automatically detects their character encoding, then converts them to Unicode strings. It wraps chardet for codec detection and exposes the decoded result and detected codec through a simple object interface. The library is useful when you receive bytes from external sources and need to reliably convert them to text without knowing the encoding in advance.
The package is actively maintained, supports modern Python versions (3.10–3.14), and has no known security vulnerabilities. Its single runtime dependency keeps installation and maintenance overhead minimal. It is marked Production/Stable and sits in the top 5000 PyPI packages by download volume, indicating steady real-world use.
Use it for:
- Automatically decode text files or network data when the source encoding is unknown or mixed.
- Handle user-uploaded files with varied character encodings in web applications.
- Process log files or data streams that may contain multi-byte characters in different encodings.
- Normalize encoded strings to Unicode before storing in databases or APIs.
- Detect and report the codec of incoming byte data for debugging or logging purposes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decodes multi-byte character strings by detecting their encoding and converting them to Unicode, using chardet for automatic codec detection.
Yes. The package is lightweight, actively maintained, has no security issues, and solves a real problem—automatic multi-byte string decoding—with minimal dependencies. Install it if you need to reliably convert encoded bytes to Unicode without knowing the source encoding in advance.
Install
mbstrdecoder on PyPI
pip
pip install mbstrdecoderuv
uv add mbstrdecoderpoetry
poetry add mbstrdecoderInstalling mbstrdecoder
Before you install
Low install friction with a single dependency (chardet). Actively maintained with recent commits and marked as Production/Stable. Supports modern Python versions from 3.10 onward.
License in practice
MIT License permits commercial and private use with minimal restrictions—suitable for most projects without licensing concerns.
Quickstart
pip install mbstrdecoder
from mbstrdecoder import MultiByteStrDecoder
encoded = "マルチバイト文字".encode("utf-8")
decoder = MultiByteStrDecoder(encoded)
print(decoder.unicode_str) # マルチバイト文字
print(decoder.codec) # utf_8
Requires Python 3.10 or later.
Verify before relying
- Whether chardet's detection accuracy meets your use case (e.g., for ambiguous or mixed encodings).
- Performance characteristics when processing large volumes of encoded text.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — chardet |
| Maintenance | actively maintained — 101 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,436,273/month — #1,739 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mbstrdecoder-1.1.5-py3-none-any.whl
Keywords: multi-byte character, unicode, decoder
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
latexcodecProvides a Python codec to convert between…
permissive · top 5,000 on PyPI
morphysMorphys provides utility functions to convert…
permissive · top 15,000 on PyPI
reedsoloEncodes and decodes data using Reed-Solomon…
permissive · top 5,000 on PyPI
rtfunicodeEncodes Unicode strings to RTF 1.5 command…
permissive · top 15,000 on PyPI
base2048Encodes and decodes binary data using Base2048,…
permissive · top 15,000 on PyPI
encutilsProvides encoding and character detection…
copyleft · top 5,000 on PyPI
mutf8Encodes and decodes MUTF-8 (Modified UTF-8), a…
permissive · top 5,000 on PyPI
py-multibaseEncodes and decodes data using the Multibase…
permissive · top 15,000 on PyPI
binaryornotDetermines whether a file is binary or text by…
permissive · top 1,000 on PyPI
msgfyConverts Python Exception instances into…
permissive · top 15,000 on PyPI