Registry / data / jaconv

jaconv

JSON →
library0.5.0pypypi✓ verified 24d ago

jaconv is a pure-Python library designed for interconverting Japanese characters, including Hiragana, Katakana, Hankaku (half-width), Zenkaku (full-width), and Romaji. It provides a straightforward API for various common text processing tasks involving Japanese script. The library is actively maintained, with its latest version being 0.5.0, and has a consistent release cadence addressing bug fixes and improvements.

pip install jaconv
INSTALL
IMPORT
SIG · JACONV
J
jaconv
datapythonv0.5.0
Install
1.5s avg
Import
10ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.006s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.006s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

jaconv
import jaconv

Convert between Hiragana, Katakana, Half-width, Full-width, and Romaji characters using jaconv's core functions.

import jaconv # Hiragana to Katakana h_to_k = jaconv.hira2kata('ともえまみ') # => 'トモエマミ' print(f"Hiragana to Katakana: {h_to_k}") # Katakana to Hiragana k_to_h = jaconv.kata2hira('巴マミ') # => '巴まみ' print(f"Katakana to Hiragana: {k_to_h}") # Half-width character to Full-width character h_to_z = jaconv.h2z('ティロ・フィナーレabc123', kana=True, ascii=True, digit=True) # => 'ティロ・フィナーレabc123' print(f"Half-width to Full-width: {h_to_z}") # Full-width character to Half-width character z_to_h = jaconv.z2h('ティロ・フィナーレabc123', kana=True, ascii=True, digit=True) # => 'ティロ・フィナーレabc123' print(f"Full-width to Half-width: {z_to_h}") # Alphabet to Hiragana alph_to_hira = jaconv.alphabet2kana('japan') # => 'じゃぱん' print(f"Alphabet to Hiragana: {alph_to_hira}") # Hiragana to Alphabet (Hepburn-style) hira_to_alph = jaconv.kana2alphabet('じゃぱん') # => 'japan' print(f"Hiragana to Alphabet: {hira_to_alph}")
Debug
Known issues
gotchaThe conversion logic for `alphabet2kana` and `kana2alphabet` functions, especially concerning small kana and specific romanization rules, has undergone several bug fixes and refinements across various versions (e.g., 0.2.3, 0.3, 0.5.0). This may lead to different conversion results for the same input when migrating between `jaconv` versions.
fix
Always test conversion outputs thoroughly after upgrading `jaconv`. Refer to release notes for specific bug fixes related to these functions, especially for `small-kana` and `alphabet2kana` behavior changes in v0.5.0.
affects: All versions prior to 0.5.0, and potentially some older 0.x releases.
deprecatedSome original function names, such as `hankaku2zenkaku` and `zenkaku2hankaku`, were deprecated in very early versions (e.g., 0.1) in favor of more concise and commonly used aliases like `h2z` and `z2h`. While the deprecated names might still function for backward compatibility in some cases, it is strongly recommended to use the modern aliases for clarity and future-proofing.
fix
Update calls from `hankaku2zenkaku` to `jaconv.h2z` and `zenkaku2hankaku` to `jaconv.z2h`.
affects: Deprecated since v0.1.x.
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'jaconv'
The 'jaconv' library has not been installed in your Python environment or is not accessible on the Python path.
fix
Install the library using pip: `pip install jaconv`
TypeError: 'module' object is not callable
You are attempting to call the 'jaconv' module itself as a function (e.g., `jaconv()`) instead of calling one of its specific conversion functions (e.g., `jaconv.hira2kata()`).
fix
Access the desired conversion function directly from the module, for example: `jaconv.hira2kata('ともえまみ')`
AttributeError: module 'jaconv' has no attribute 'hira_to_kata'
You are trying to call a function that does not exist within the 'jaconv' module, likely due to a typo or misunderstanding the function naming convention. The correct function for Hiragana to Katakana conversion is `hira2kata`.
fix
Use the correct function name as defined in the library's API: `jaconv.hira2kata('ともえまみ')`
Upgrade
Version history
0.5.0latest on PyPI · released Feb 8, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
jaconv — pip install jaconv · libregistry