Japanese text frequently mixes full-width (zenkaku) and half-width (hankaku) characters, which breaks search and data consistency. This converter normalises ASCII and katakana between the two widths using the correct Unicode mappings.
How it works
Full-width ASCII is a clean offset of plain ASCII, so the conversion is arithmetic rather than a lookup table:
full-width ASCII U+FF01..U+FF5E = ASCII U+0021..U+007E + 0xFEE0
full-width space U+3000 <-> half-width space U+0020
half-width katakana U+FF61..U+FF9F -> full-width katakana (table)
カ + ゙ (dakuten) -> ガ
ハ + ゚ (handakuten) -> パ
To go from full-width to half-width, subtract 0xFEE0; to go the other way, add it. For half-width katakana the tool uses a mapping table and looks ahead one character to recombine a trailing voiced or semi-voiced mark into the single composed kana.
Tips and example
Hello 2026 converts to Hello 2026, and half-width ガイド converts to ガイド. Normalise ASCII to half-width and katakana to full-width before indexing user input, so that A and A, or テスト and テスト, are treated as the same string. Apply the same normalisation to both the stored data and the query.