← Back to DevKit

Full/Half Width Converter

FULL/HALF WIDTH · DATA & PROCESS

Two-way full-width ↔ half-width conversion with automatic ASCII offset; great for cleaning "wide" characters copied from Word or chat apps.

Input text
Result

>_ USAGE GUIDE

Full-width ↔ half-width conversion in both directions: English letters, digits, punctuation, and spaces all map automatically between standard ASCII and their full-width counterparts. Paste and the result appears in real time.

The classic scenario is cleaning text copied from Word, chat apps, or meeting notes: commas, quotes, and spaces are often full-width (, , curly quotes, full-width spaces). Pasted into code, a shell, or a form, they cause errors even though they look identical — the characters are simply different Unicode points. One conversion pass puts them back into plain ASCII and the problem disappears.

  1. Paste the offending text: code, commands, or form values that look right but fail
  2. Convert: full-width characters map to half-width, or the reverse if you need wide typesetting
  3. Paste it back: the cleaned text compiles, runs, or validates

Everything converts locally in your browser with zero uploads — no network, no storage, works offline.

>_ FAQ

Q1 · What is the actual difference between full-width and half-width characters?

Half-width characters are standard ASCII (1, a, ,); full-width characters are the fixed-width forms used in East Asian typesetting (1, a, , ). They are different Unicode characters — visually almost identical to the eye but completely different to a machine comparison. That gap is the root cause of "looks right, doesn't run".

Q2 · Why does code or a command copied from Word or a chat app keep failing?

Typing with a Chinese input method produces full-width punctuation by default: ; becomes ;, quotes become curly quotes, spaces become full-width spaces. Interpreters do not recognize these characters and report syntax errors. Paste the failing line into this tool, convert to half-width, paste it back — this is the first step for any "copied command won't run" mystery.

Q3 · How do I detect invisible full-width spaces?

A full-width space (U+3000) renders as blank just like a normal space, so the eye cannot tell them apart. Symptoms include form validation failing for no visible reason, string comparisons coming back unequal, and \s not matching. Convert the text once with this tool — or view it in an editor that shows invisible characters — then diff against the original to locate the offenders.

Q4 · When should full-width characters be kept?

Punctuation inside Chinese prose (, 。!?) is supposed to be full-width — converting it would be non-standard and change meaning. What this tool is for is full-width characters that sneaked into code, commands, numbers, and English content. Do not blanket-convert a Chinese article; its punctuation semantics would break.

Q5 · Can regex match full-width characters?

Yes, match them as the Unicode characters they are: full-width digits are 0-9 (U+FF10–FF19) and the full-width space is \u3000. In practice, the cleaner workflow is to normalize everything to half-width with this tool first, then use ordinary \s and \d patterns — far simpler than encoding full-width ranges into every regex.

Embed code

Paste the code below into your page to embed this tool as an iframe (nav and footer auto-hidden).

Heightpx
This tool runs entirely in your browser — input never leaves your device. Press Ctrl K to switch tools anytime.