OpenCC
Conversion between Traditional and Simplified Chinese
What it is and what it does
OpenCC is a Python binding to an open-source Chinese character conversion engine that handles bidirectional conversion between Simplified and Traditional Chinese, plus Japanese Kanji (Shinjitai). It operates at both character and phrase level, preserving context-aware meaning and supporting regional vocabulary differences across Mainland China, Taiwan, and Hong Kong.
The package wraps a compiled C++ library and ships prebuilt wheels for modern Python versions on major platforms. It has no runtime dependencies and is designed for text processing pipelines where Chinese normalization or localization is needed. The conversion is deterministic and does not perform translation between languages or dialects.
Use it for:
- Normalize Chinese text in a document processing pipeline to a single script (e.g., all Simplified for consistency)
- Localize Chinese content for specific regions by converting vocabulary (e.g., '鼠标' to '滑鼠' for Taiwan)
- Prepare training data for NLP models by standardizing character representation across mixed-script corpora
- Convert user-generated content in web applications to a canonical form before storage or search indexing
- Handle Japanese Kanji modernization (Shinjitai) in text that mixes modern and historical forms
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts text between Traditional Chinese, Simplified Chinese, and Japanese Kanji, supporting character-level and phrase-level conversion with regional vocabulary variants.
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive license, and solves a specific, well-defined problem for Chinese text processing. Install friction is moderate but manageable via prebuilt wheels. Recommended for any project requiring Chinese character normalization or regional text adaptation.
Install
opencc on PyPI
pip
pip install openccuv
uv add openccpoetry
poetry add openccInstalling OpenCC
Before you install
Medium install friction due to compiled wheels; prebuilt binaries available for Python 3.10–3.13 on Windows, macOS (Intel and ARM), and Linux. Package is actively maintained with a recent release and no known vulnerabilities.
License in practice
Licensed under Apache License 2.0 (permissive); safe for commercial and proprietary use with standard attribution requirements.
Quickstart
pip install opencc
import opencc
converter = opencc.OpenCC('s2t.json')
result = converter.convert('汉字')
print(result) # 漢字
Verify before relying
- Whether the package includes pre-downloaded conversion dictionaries or requires separate resource installation
- Performance characteristics for large-scale text conversion (throughput, latency)
- Whether custom conversion chains or inline configurations are accessible from the Python API
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 472,733/month — #6,474 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opencc-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl; opencc-1.4.1-cp310-cp310-macosx_11_0_arm64.whl; opencc-1.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; opencc-1.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; opencc-1.4.1-cp310-cp310-win_amd64.whl; opencc-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl; opencc-1.4.1-cp311-cp311-macosx_11_0_arm64.whl; opencc-1.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; opencc-1.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; opencc-1.4.1-cp311-cp311-win_amd64.whl; opencc-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl; opencc-1.4.1-cp312-cp312-macosx_11_0_arm64.whl; opencc-1.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; opencc-1.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; opencc-1.4.1-cp312-cp312-win_amd64.whl; opencc-1.4.1-cp313-cp313-macosx_10_13_x86_64.whl; opencc-1.4.1-cp313-cp313-macosx_11_0_arm64.whl; opencc-1.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; opencc-1.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; opencc-1.4.1-cp313-cp313-win_amd64.whl
Keywords: opencc, convert, chinese
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
opencc-python-reimplementedConverts text between Simplified Chinese,…
permissive · top 5,000 on PyPI
zhconvConverts text between Simplified and…
copyleft · top 15,000 on PyPI
wetextNormalizes and denormalizes text in Chinese,…
permissive · top 15,000 on PyPI
jiebaJieba segments Chinese text into words using…
permissive · top 5,000 on PyPI
hanzidentifierIdentifies whether a string contains Simplified…
permissive · top 15,000 on PyPI
pypinyinConverts Chinese characters to pinyin…
permissive · top 5,000 on PyPI
jieba3kPerforms Chinese word segmentation, breaking…
unclear · top 15,000 on PyPI
kanjizeConverts between Japanese kanji number…
permissive · top 15,000 on PyPI
pykakasiTransliterates Japanese text (hiragana,…
copyleft · top 5,000 on PyPI
spacy-pkusegChinese word segmentation for spaCy with…
permissive · top 15,000 on PyPI