Full-width / half-width converter
Full-width and half-width letters and digits both ways · Chinese and Western punctuation controlled separately · multi-line live conversion
切换方向后按下面勾选的类别重新转换;输入框内容不会被自动改写。
转换类别(不勾的类别原样保留)
映射规则(逐字符判断,只改命中的字符)
| 类别 | 半角 | 全角 | 规则 |
|---|---|---|---|
| 数字 | 0-9(U+0030–U+0039) | 0-9(U+FF10–U+FF19) | 码点 ± 0xFEE0 |
| 字母 | A-Z a-z | A-Z a-z | 码点 ± 0xFEE0 |
| ASCII 标点 | ! " # $ % … ~(U+0021–U+007E) | ! " # $ % … ~(U+FF01–U+FF5E) | 码点 ± 0xFEE0 |
| 空格 | U+0020 | U+3000 | 单独映射 |
| 中文标点 | , . ; : ! ? ( ) [ ] < > ~ | ,。;:!?()【】《》~ | 单独表,优先于上面两行 |
FAQ
Mainly one fixed code-point offset: the ASCII printable range U+0021 to U+007E pairs one-to-one with the fullwidth range U+FF01 to U+FF5E - add 0xFEE0 to a halfwidth code point to get its fullwidth form, subtract it to go back. The space is handled separately: the fullwidth space U+3000 maps to the halfwidth space U+0020. On top of that there is a small table of common Chinese punctuation (enumeration comma, book-title marks, corner brackets, curly quotes and the like) covering characters outside that range; the Chinese-punctuation switch controls whether it applies.
No. The tool checks each character's code point against the ranges and the table and only replaces hits; Chinese characters, Japanese kana, emoji, other Unicode symbols, plus line breaks, tabs and the non-breaking space U+00A0 all pass through untouched. Halfwidth and fullwidth katakana are out of scope - they form their own Japanese pairing rather than being the fullwidth form of ASCII, so this tool does not convert between them.
Chinese punctuation to English is many-to-one: the enumeration comma and the fullwidth comma both map to the halfwidth comma, and the thin angle bracket to the plain less-than sign, corner brackets to plain quotes - so converting to halfwidth and back restores only the primary mapping (the enumeration comma comes back as the regular comma). That is the inherent trade-off of character-level substitution; the tool does no context analysis. Quotes likewise get plain character replacement with no open/close pairing: Chinese quotes collapse to straight double or single quotes when going halfwidth, and when going the other way quotes are left alone rather than guessing which side each one opens.
No. The conversion runs locally in your browser with no network requests, and reloading clears it. Up to 500,000 characters per run (longer input is flagged for splitting); it is a one-pass per-character scan, so 200,000 characters typically finish in tens of milliseconds, and mixed Chinese-English multi-line text is fine. Note the tool only touches the character classes listed above - it will not tidy up leading or trailing whitespace or extra line breaks on the side.